home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Doco ƒ / CSMP ƒ / CSMP-V1-066.TXT < prev    next >
Encoding:
Text File  |  1992-06-03  |  104.5 KB  |  2,532 lines

  1. C.S.M.P. Digest             Thu, 30 Apr 92       Volume 1 : Issue 66
  2.  
  3. Today's Topics:
  4.  
  5.      Suggestion to the Developers of Think C
  6.  
  7.  
  8. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  9.  
  10. These digests are available (by using FTP, account anonymous, your email
  11. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  12. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  13. Questions list.  The last several issues of the digest are available from
  14. sumex-aim.stanford.edu as well.
  15.  
  16. These digests are also available via email.  Just send a note saying that you
  17. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  18. automatically receive each new digest as it is created.
  19.  
  20. The articles in these digests are taken directly from comp.sys.mac.programmer.
  21. They are not edited; all articles included in this digest are in their original
  22. posted form.  The only articles that are -not- included in these digests are
  23. those which didn't receive any replies (except those that give information
  24. rather than ask a question).  All replies to each article are concatenated
  25. onto the original article in the order in which they were received.  Article
  26. threads are not added to the digests until the last article added to the
  27. thread is at least one month old (this is to ensure that the thread is dead
  28. before adding it to the digests).
  29.  
  30. Send administrative mail to mkelly@cs.uoregon.edu.
  31.  
  32. -------------------------------------------------------
  33.  
  34. From: gmarzot@mitre.org (G. S. Marzot (Joe))
  35. Subject:  Suggestion to the Developers of Think C
  36. Date: 29 Feb 92 18:17:18 GMT
  37. Organization: The MITRE Corporation
  38.  
  39. How about an editor which supports the OOP features. To steal a few ideas 
  40. from ACIUS' Object Master (which although quite nice is slanted more 
  41. toward MPW) single step Class and method creation and method overrides and 
  42. method deletion. It is often a pain to have to do all the book keeping of 
  43. classes twice, both in the header and source file. 
  44.  
  45. I would also put in a purchase req. or two for Think C++.
  46. Keep up the good work.
  47.  
  48. On the subject of compiler error logging - I say, what errors ;-)
  49.  
  50. -GSM
  51.  
  52.  
  53. Email: gmarzot@linus.mitre.org
  54.  
  55. (standard  disclaimer)
  56.  
  57.  
  58.  
  59. - -------------------------
  60.  
  61. From: Joe.Francis@dartmouth.edu (Joe Francis)
  62. Subject:  Suggestion to the Developers of Think C
  63. Date: 1 Mar 92 01:25:13 GMT
  64. Organization: Dartmouth College, Hanover, NH
  65.  
  66. In article <1992Feb29.150609.15539@doug.cae.wisc.edu>
  67. jverdega@cae.wisc.edu (Jeffrey Verdegan) writes:
  68.  
  69. > I agree 10^6% !!!!
  70.  
  71. Now... how did those operators bind again???
  72.  
  73. Is it (10^6)% ?
  74.  
  75. or (10%)^6 ?
  76.  
  77. :-P
  78.  
  79.  
  80.  
  81. - -------------------------
  82.  
  83. Organization: Penn State University
  84. Date: Sunday, 1 Mar 1992 02:48:38 EST
  85. From: Christopher Tate <CXT105@psuvm.psu.edu>
  86. Subject:  Suggestion to the Developers of Think C
  87.  
  88. In article <1992Feb27.223708.20710@aio.jsc.nasa.gov>, brian@galileo.jsc.nasa.gov
  89. (Brian Donnell) says:
  90. >
  91. >I am posting this suggestion for Think C for general perusal rather than
  92. >sending it directly to Symantec so that other Think C users can add their
  93. >two cents worth.  The voice of many users will have more impact.
  94.  
  95. Umm.  I'm not sure this is going to work, actually.  I suspect that if
  96. everyone who responds to this article were to actually *mail* their
  97. comments to Symantec, on real honest-to-God wood-pulp paper, there would
  98. be a better response.  Remember, people like Phil Shapiro and Rich
  99. Siegel read news on their own initiative; it's not a company function.
  100.  
  101. That said, I think that it's wonderful that a product has enough support
  102. among its users that a post like this gets such a huge response!
  103.  
  104. >I think Think (:-)) C is one of the better programming environnments available
  105. >on the market today.  With each release have come more improvements.  There
  106. >are still things lacking (like C++ 2.1 conformance),
  107.  
  108. Okay; here's my first suggestion:  Don't bother with THINK C++.
  109.  
  110. (No, no; quiet back there!  Let me finish...)
  111.  
  112. Symantec has already acquired a C++ product, from a compiler developer
  113. who's been giving Borland a run for its money for a lot of years in the
  114. MS-DOS world -- not an insignificant feat.  Let Zortech run with its
  115. C++ compiler.  They're the ones who *want* to do it, they have the
  116. background for it, and the product already exists.  Sure, you might
  117. want to work on getting its debugging environment up to speed with
  118. THINK C's, but I don't see any need either to make THINK into what would
  119. basically be a competing product, or to subsume the Zortech product into
  120. THINK C.
  121.  
  122. Indeed; some people don't *want* C++.  I'm fully aware that that's a
  123. heretical statement in some circles, but *expert* opinion is more divided
  124. on C++ than many people realize.  Certainly it can be a powerful tool
  125. for establishing maintainability or for designing a program structure,
  126. but it's not really any "easier" to use OOP; it's a subtle skill that
  127. some programmers are simply not comfortable with.  It's not their style.
  128. And [he says, climbing out on a limb] it's not necessarily the "wave of
  129. the future" that so many people (both well- and ill-informed) seem to
  130. think.
  131.  
  132. >but I think the largest
  133. >lacking feature is Think C's failure to report many types of errors/
  134. >bad coding styles.  I would like to see Think C create a listing of warnings
  135. >simliar to other compilers that includes things such as: unused variables,
  136. >suspicious typecasts, using = where it looks like == should be used, and
  137. >other things that are technically correct but may not be what the programmer
  138. >truly intended.
  139.  
  140. 'lint' can be a very useful tool, I agree.  I can certainly see this as
  141. an option similar to the "Preprocess" or "Disassemble" menu items --
  142. you'd command the compiler to give you a list of warnings and potential
  143. coding errors, but this wouldn't be part of a normal compile cycle.
  144.  
  145. I'd *love* to have this sort of thing in a separate window, and rig
  146. things such that double-clicking on a given warning line opens up the
  147. corresponding source file and highlights the line in question.
  148.  
  149. >I would also like Think C to get way from this 'stop on the first error'
  150. >nonsense.  Write it all out to a log file - so that I can leave a long
  151. >compile unattended w/o being 99.999% sure that there will be no errors.
  152.  
  153. Actually, I don't mind this, because THINK C is *fast*.  I don't have
  154. a problem with fixing every error in my source as I go; it makes me keep
  155. my code clean, and do things right the first time around.  I *love* the
  156. "Require Prototypes" option, for much the same reasons -- it keeps me
  157. from making mistakes from the outset.
  158.  
  159. <Begin obligitory pedantic mode>
  160.  
  161. If it takes the compiler that much time to run into an error, then you
  162. may really want to split the project into smaller files.  [I'll admit
  163. that I'm a big fan of the "write a little bit, then compile it again to
  164. see if it still works" approach to programming.  THINK C's speed makes
  165. this possible.]
  166.  
  167. <End pedantic mode>
  168.  
  169. I remember hearing from someone in some sort of semi-official capacity
  170. say that making THINK C try to compensate for errors and continue its
  171. compilation would require a major rewrite, and would slow it down
  172. significantly.  It's not worth it -- THINK C is just too damn fast; I
  173. wouldn't want to hurt that.  Just look at how many people complained
  174. when the global optimizer appeared, and slowed things down a bit.  And
  175. THINK C 5 with the optimizer is *still* quite a bit faster than MPW,
  176. let alone gcc.
  177.  
  178. Now, here are a few of my favorite suggestions:
  179.  
  180. The generated code *could* be better.  Global optimizations are a step
  181. in the right direction, but there's still room for improvement.  This
  182. came up about a month ago, regarding THINK's and MPW's use of the
  183. DBxx instruction family.
  184.  
  185. I want disassembled code to have actual variable names instead of the
  186. "0x0000(A5)" that it currently uses.  Just having the actual offsets
  187. would be nice, instead of always using 0x0000.  Also, I don't see why
  188. a file that's already been compiled has to be *recompiled* just to get
  189. a disassembly.
  190.  
  191. I'd like to have some of the CMarker functionality built into the
  192. editor -- especially the little menu to pull down that gives you a
  193. list of all functions in the document, in order to jump to them.
  194.  
  195. Also for the editor, I'd like to see some sort of "command-arrow-key"
  196. functionality that causes the screen to scroll right and left when the
  197. cursor leaves the window, or causes the cursor to track with the page
  198. up and page down keys.  I hate having to leave the keyboard to click in
  199. the window once I've found the place that I want to edit....
  200.  
  201. I'd like to be able to edit generic text files without requiring a
  202. project file to be open.
  203.  
  204. I'd *especially* like to search/replace in files that aren't in the
  205. current project.
  206.  
  207. I want to be able to set the *default* font and size without ResEdit.
  208.  
  209. (Unlike some people, I *like* the THINK C editor.  The above are just
  210. about the only gripes that I have about it.)
  211.  
  212. - -----
  213. Christopher Tate     | Cryptogram #22:
  214. cxt105@psuvm.psu.edu |
  215. CXT105@PSUVM.BITNET  | CP VPY FJXU YBU FKNYJXU PI YBKVXKVT APMHNUWI
  216. - -------------------| VUEUNNJHA.  YBU THJZUAJHCN JHU IMWW PI FUV QBP
  217. Send me the answer!  | YBPMTBY YBUA EPMWC VPY LU HUDWJEUC.
  218.  
  219.  
  220.  
  221. - -------------------------
  222.  
  223. From: chait@cs.umass.edu
  224. Subject:  Suggestion to the Developers of Think C
  225. Date: 1 Mar 92 17:19:25 GMT
  226. Organization: COINS, UMass, Amherst
  227.  
  228. In article <1992Feb28.013210.14152@sunb10.cs.uiuc.edu>, pjl@sunc5.cs.uiuc.edu (Paul Lucas) writes...
  229. >    Since they now own the Zortech compiler, it should be easy to
  230. >    fold it into the Think environment (which is a lot friendlier
  231. >    than MPW, not to mention _lot's_ more inexpensive--MPW C++
  232. >    withtout MacApp is $600).
  233.  
  234. Let's be realistic about combining two products, especially when they are
  235. compilers.  Two completely different approaches are probably used in the
  236. two, and I'd like to see Think C stay as fast as it is...
  237.  
  238. >    The upgrade price for 4.0 to 5.0 is too high (~$95); I'm not
  239. >    going to upgrade again until Think C++ arrives, if ever.  (Do
  240. >    you hear that, Symantec?  No more money until C++!)
  241.  
  242. There hasn't been any C++ 'features' that I have needed and haven't been able
  243. to get along without.  C++ seriously munges programming style more and more,
  244. especially letting you declare vars anywhere in your code (the reason for
  245. putting them at the top of a fn was readibility, and boy is readibility
  246. losing it in c++!).  If you don't like the $95 upgrade, go purchase MPW--
  247. I'm sure you'll save money that route! ;)
  248.  
  249. >    If they wan't to keep a market, they have to give it what it
  250. >    wants, not what they think is good for them.  The market wants
  251. >    C++; it wants it yesterday.
  252.  
  253. Who is the market?  I don't need full C++.  If you are serious about OOP,
  254. you'll be using SmallTalk or CLOS (real object systems) and not a language
  255. that was force-fed object ideas.  The market wants better OOP development
  256. tools, languages, etc.  C++ will probably go away, but I'm willing to bet
  257. we'll see the next gereation of languages like CLOS for a long time yet.
  258. Note: I am not a CLOS programmer; rather, I LOVE Think C (have for a long
  259. time) and until OOP gets much simpler, I'll keep myself with as much control
  260. as possible.
  261. For everyone who wants more features, someone mentioned the key point: Think
  262. C is what it is because of reduction of feature set to necessity.  Granted,
  263. some added features would be useful, but the closer you try and push it
  264. towards MPW, the more it slows down like MPW.  I'm sorry, but I worked with
  265. MPW under C, C++, Pascal, and ASM all summer long, and it took me more time
  266. getting MPW to do things the way I wanted, and sitting around for ungodly
  267. amounts of time waiting for compiles.  If you need a 'I tell you once and
  268. then you do everything for me' system (i.e., you grew up on and love Unix),
  269. then that's great--more power to you.  The Mac's power is its simplicity.
  270. Think C's power is also its simplicity.  So, I can't make fine-tuned Make
  271. files.  I hate working with MPW for just that reason.  I'd rather do the one
  272. or two things by hand and let Think take care of everything else.  MPW will
  273. beat Think C on feature set because MPW is a full programmer's environment.
  274. But, I'll bet you that I'll get a program running faster under Think C, and
  275. with less bugs...
  276. The entire Symantec Languages Group should be commended for their work.  They
  277. are a tiny group for what they are handling, and they are effectively
  278. competing against Apple (MPW)... not many others are.
  279.  
  280. Dave Chait
  281. Chief Architect
  282. Future Generation Software
  283.  
  284.  
  285.  
  286. - -------------------------
  287.  
  288. From: glenn@gla-aux.uucp (Glenn Austin)
  289. Subject:  Suggestion to the Developers of Think C
  290. Date: Sun, 1 Mar 92 11:31:55 PST
  291. Organization: The Pit Lane
  292.  
  293.  
  294. In article <1992Feb29.150609.15539@doug.cae.wisc.edu> (comp.sys.mac.programmer), jverdega@cae.wisc.edu (Jeffrey Verdegan) writes:
  295. > In article <1992Feb27.223708.20710@aio.jsc.nasa.gov> brian@galileo.jsc.nasa.gov (Brian Donnell) writes:
  296. > >bad coding styles.  I would like to see Think C create a listing of warnings
  297. > >
  298. > >I would also like Think C to get way from this 'stop on the first error'
  299. > >nonsense.  Write it all out to a log file - so that I can leave a long
  300. > >compile unattended w/o being 99.999% sure that there will be no errors.
  301. > >
  302. > >What does everyone else think?
  303. > I agree 10^6% !!!!
  304.  
  305. As long as you make it an OPTION -- I don't mind.  But, I don't want several
  306. pages of error logs when all I forgot was a }.  Try it with MPW (or any
  307. other C compiler) sometime.  Personally, THINK C is so quick, that, although
  308. it is an annoyance, it doesn't take that long to watch it for a particular
  309. file...
  310.  
  311. I agree, however, with the warning of unused variables -- it could fix bugs
  312. where someone is allocating a ton of space on the stack with a variable
  313. which is now unused, and then getting stack-heap collision errors at runtime...
  314.  
  315. ===============================================================================
  316. | Glenn L. Austin                | "Turn too soon, run out of room.           |
  317. | Macintosh Wizard and           |    Turn too late, much better fate."       |
  318. | Auto Racing Driver             |   -- Jim Russell Racing School Instructors |
  319. | Usenet:  glenn@gla-aux.uucp or glenn%gla-aux.uucp@skinner.cs.uoregon.edu    |
  320. ===============================================================================
  321.  
  322.  
  323.  
  324. - -------------------------
  325.  
  326. From: pjl@suna1.cs.uiuc.edu (Paul Lucas)
  327. Subject:  Suggestion to the Developers of Think C
  328. Date: 2 Mar 92 03:07:07 GMT
  329. Organization: University of Illinois at Urbana-Champaign
  330.  
  331. In <44141@dime.cs.umass.edu> chait@cs.umass.edu writes:
  332.  
  333. >In article <1992Feb28.013210.14152@sunb10.cs.uiuc.edu>, pjl@sunc5.cs.uiuc.edu (Paul Lucas) writes...
  334. >>    Since they now own the Zortech compiler, it should be easy to
  335. >>    fold it into the Think environment (which is a lot friendlier
  336. >>    than MPW, not to mention _lot's_ more inexpensive--MPW C++
  337. >>    withtout MacApp is $600).
  338.  
  339. >Let's be realistic about combining two products, especially when they are
  340. >compilers.  Two completely different approaches are probably used in the
  341. >two, and I'd like to see Think C stay as fast as it is...
  342.  
  343.     I would personally like to give them some credit and assume that
  344.     they're smart enough to integrate the products.  By "fast" I
  345.     assume you're referring to compile-times.  It's almost a
  346.     non-issue; machines get faster and nobody buys your code because
  347.     your compiler is fast, but on how good your code is.
  348.  
  349. >>    The upgrade price for 4.0 to 5.0 is too high (~$95); I'm not
  350. >>    going to upgrade again until Think C++ arrives, if ever.  (Do
  351. >>    you hear that, Symantec?  No more money until C++!)
  352.  
  353. >There hasn't been any C++ 'features' that I have needed and haven't been able
  354. >to get along without.  C++ seriously munges programming style more and more,
  355. >especially letting you declare vars anywhere in your code (the reason for
  356. >putting them at the top of a fn was readibility, and boy is readibility
  357. >losing it in c++!).  If you don't like the $95 upgrade, go purchase MPW--
  358. >I'm sure you'll save money that route! ;)
  359.  
  360.     Then you haven't really tried to use C++.  No language makes
  361.     programmers write "munged" programs--programmers write "munged"
  362.     programs.  You can write truly awful, impossible-to-read, and
  363.     nightmare-to-maintain programs in any language, C++ included.
  364.  
  365.     One of the reasons for lifting the declaration restriction was
  366.     so that objects are initialized at the same time preventing
  367.     uninitialized variable bugs.  Another reason, especially for
  368.     constructed objects, is efficiency; declaring a variable at the
  369.     top initializes it, and setting its value later initializes it
  370.     again.
  371.  
  372. >>    If they wan't to keep a market, they have to give it what it
  373. >>    wants, not what they think is good for them.  The market wants
  374. >>    C++; it wants it yesterday.
  375.  
  376. >Who is the market?  I don't need full C++.  If you are serious about OOP,
  377. >you'll be using SmallTalk or CLOS (real object systems) and not a language
  378. >that was force-fed object ideas.  The market wants better OOP development
  379. >tools, languages, etc.  C++ will probably go away, but I'm willing to bet
  380. >we'll see the next gereation of languages like CLOS for a long time yet.
  381. >Note: I am not a CLOS programmer; rather, I LOVE Think C (have for a long
  382. >time) and until OOP gets much simpler, I'll keep myself with as much control
  383. >as possible.
  384.  
  385.     If you've really been reading comp.lang.c++ and related
  386.     newsgroups, there are always questions of the form "Where can I
  387.     get C++ for my Mac?"
  388.  
  389.     Yes, I am serious about OOP, but big, hulking, nasty, army-of-
  390.     programmers, production software isn't written in SmallTalk or
  391.     CLOS.  C++ retains all of C's efficiency and only does the
  392.     absolute minumum to implement the new features.
  393.  
  394.     This "discussion," which I would like to keep it, as opposed to
  395.     a flame, is also really arguing apples and oranges: Think C (an
  396.     implementation of C) and C++ (an entire language).  If the people
  397.     at Symnatec wanted to, I'm confident that they could produce a
  398.     full C++ compiler as simple and as fast as Think C.
  399.  
  400. >For everyone who wants more features, someone mentioned the key point: Think
  401. >C is what it is because of reduction of feature set to necessity.  Granted,
  402. >some added features would be useful, but the closer you try and push it
  403. >towards MPW, the more it slows down like MPW.  I'm sorry, but I worked with
  404. >MPW under C, C++, Pascal, and ASM all summer long, and it took me more time
  405. >getting MPW to do things the way I wanted, and sitting around for ungodly
  406. >amounts of time waiting for compiles.  If you need a 'I tell you once and
  407. >then you do everything for me' system (i.e., you grew up on and love Unix),
  408. >then that's great--more power to you.  The Mac's power is its simplicity.
  409. >Think C's power is also its simplicity.  So, I can't make fine-tuned Make
  410. >files.  I hate working with MPW for just that reason.  I'd rather do the one
  411. >or two things by hand and let Think take care of everything else.  MPW will
  412. >beat Think C on feature set because MPW is a full programmer's environment.
  413. >But, I'll bet you that I'll get a program running faster under Think C, and
  414. >with less bugs...
  415.  
  416.     Yes, I agree, but now that Think C has a foothold and a market,
  417.     it's time for it to grow up.  Remember the 128K Mac?  It was a
  418.     very-much watered-down Lisa.  The Lisa was too-much-tool
  419.     quickly with a big price-tag ($10,000).  The Mac also made it
  420.     because of the reduced feature-set.  Look at Macs now--all
  421.     grown up: multitasking, 3 font technologies, knock-your-socks-
  422.     off color, sound, etc.  
  423.  
  424.     Also, remember the original Mac commercials?  Specifically, the
  425.     one with an IBM PC on a desk and then the hulking user-manual
  426.     crashing down next to it; then a Mac, will a thin booklet almost
  427.     floating down next to it?  Of course, the situation is reversed
  428.     when it comes to programming the thing (case in point: Inside
  429.     Macintosh I-VI plus the technotes--end-to-end, it's about s foot
  430.     thick).  In order to program the Mac (and even Apple has said
  431.     this), you're going to need OOP.
  432.  
  433. >The entire Symantec Languages Group should be commended for their work.  They
  434. >are a tiny group for what they are handling, and they are effectively
  435. >competing against Apple (MPW)... not many others are.
  436.  
  437.     Yes, it's a great product--no argument.  Again, the other reason
  438.     Think C made it is because it's also _lot's_ cheaper.
  439. -- 
  440.     - Paul J. Lucas                University of Illinois    
  441.       AT&T Bell Laboratories        at Urbana-Champaign
  442.       Naperville, IL            pjl@cs.uiuc.edu
  443.  
  444.  
  445.  
  446. - -------------------------
  447.  
  448. From: andre@speedy.cs.pitt.edu (Andre "Just A Plumber" Srinivasan)
  449. Subject:  Suggestion to the Developers of Think C
  450. Date: 2 Mar 92 02:40:00 GMT
  451. Organization: Acme Plumbing Services And Exploding Cigars
  452.  
  453. ) One other suggestion I have for Symantec is that they support the
  454. ) extended keyboard's special keys a little better.  Page up, down,
  455. ) home, etc. should move the cursor, not just the window...  Maybe
  456. ) having a key which would return to the last 'editing point' would make
  457. ) them feel better about changing this, but I think this would be an
  458. ) important change.
  459.  
  460. check out cmaster from jersey scientific.  its an add-on to think c
  461. that makes the editing environment more usable by someone who is use
  462. to a programmer's editor.
  463.  
  464.                                 -andre
  465.  
  466. --
  467. Andre Srinivasan  :     "This file provides programmers with information
  468. 734 LRDC          :     proving that it really was a hardware problem..."
  469. U. of Pittsburgh  :
  470. andre@cs.pitt.edu :                - MacsBug Ballon Help
  471.  
  472.  
  473.  
  474. - -------------------------
  475.  
  476. From: johnsone@uxh.cso.uiuc.edu (Erik A. Johnson)
  477. Subject:  Suggestion to the Developers of Think C
  478. Organization: University of Illinois at Urbana
  479. Date: Mon, 2 Mar 1992 07:31:59 GMT
  480.  
  481. andre@speedy.cs.pitt.edu (Andre "Just A Plumber" Srinivasan) writes:
  482. >) One other suggestion I have for Symantec is that they support the
  483. >) extended keyboard's special keys a little better.  Page up, down,
  484. >) home, etc. should move the cursor, not just the window...  Maybe
  485. >) having a key which would return to the last 'editing point' would make
  486. >) them feel better about changing this, but I think this would be an
  487. >) important change.
  488. >
  489. >check out cmaster from jersey scientific.  its an add-on to think c
  490. >that makes the editing environment more usable by someone who is use
  491. >to a programmer's editor.
  492.  
  493. I agree completely!  Many of the "I want _________ in the THINK C editor"
  494. that I've seen in this thread are available in cmaster.  (For those of
  495. you who are familiar with the old cmarker, that gave you a pop-up menu
  496. of all the function in your program by command-clicking in the window's
  497. title bar -- cmaster is the next generation, including cmarker's abilities
  498. and a lot more.)
  499.  
  500. They have an applelink address: jersci@applelink.apple.com
  501.  
  502. (Standard disclaimer -- I have no connection with jersey scientific other
  503. than being a very happy user of cmaster.)
  504.  
  505.  
  506. Erik A. Johnson        \    Internet: johnsone@uxh.cso.uiuc.edu     \       |
  507. - ----------------------\    AmericaOnline: ErikAJ                   \    --+--
  508. Graduate Student         \--------------------------------------------\     |
  509. Aero/Astro Engineering    \  "Jesus said to him, 'I am the way, and    \    |
  510. University of Illinois at  \  the truth, and the life; no one comes to  \   |
  511.    Urbana-Champaign (UIUC)  \  the Father except through me.'" (Jn14:6)  \
  512.  
  513.  
  514.  
  515. - -------------------------
  516.  
  517. From: chait@cs.umass.edu
  518. Subject:  Suggestion to the Developers of Think C
  519. Date: 2 Mar 92 04:21:28 GMT
  520. Organization: COINS, UMass, Amherst
  521.  
  522. In article <1992Mar2.030707.22699@sunb10.cs.uiuc.edu>, pjl@suna1.cs.uiuc.edu (Paul Lucas) writes...
  523. >    Yes, it's a great product--no argument.  Again, the other reason
  524. >    Think C made it is because it's also _lot's_ cheaper.
  525.  
  526. Well, maybe you just made the key point.  It is still faster, it is still
  527. simpler, and hey, it's still cheaper.  Anyone want to wager on how much
  528. the Think C being envisioned would cost?  Me, I'm a college student with no
  529. money.  I've worked for companies who had the money to throw around and could
  530. purchase the entire MPW set for every programmer.  I broke into a sweat simply
  531. finding out how much the basic shell costs.  If I want that much power and
  532. flexibility, I'd probably want a real OS too, so let's scrap the Mac and
  533. go unix (note the <GRIN>)...
  534.  
  535. Dave Chait
  536. Chief Architect
  537. Future Generation Software
  538. "Anyone want to hire a recent grad? What's that? You don't hire recent grads?"
  539.  
  540.  
  541.  
  542. - -------------------------
  543.  
  544. From: bpb9204@tamsun.tamu.edu (Brent)
  545. Subject:  Suggestion to the Developers of Think C
  546. Date: 2 Mar 92 14:32:00 GMT
  547. Organization: Texas A&M Univ., Inc.
  548.  
  549. brian@galileo.jsc.nasa.gov (Brian Donnell) writes:
  550. | [more warnings to be printed desired]
  551.  
  552. What I would like to see is a cross-referencing option.  5.0 has the
  553. "Create Link Map" option which is helpful for finding variable locations
  554. in the compiled code, but what about finding them in the source code?
  555. The Find... command works great, but a nice full-fledged cross
  556. reference would be extremely nice and not much more code to implement.
  557. Think C already tells you where variables/functions are referenced
  558. if the link fails.
  559.  
  560. Cross Reference format:
  561. IDENTIFIER  (FILE.C)  4* 5 20 30 40 50
  562.             (foo.c)  24   48   76  
  563. i.e., for each identifier, print the file(s) it is referenced in (which
  564. think C already keeps track of) and the line numbers on which it is
  565. referenced with the variable definition line # having the asterisk.
  566.  
  567. |I would also like Think C to get way from this 'stop on the first error'
  568. |nonsense.  Write it all out to a log file - so that I can leave a long
  569. |compile unattended w/o being 99.999% sure that there will be no errors.
  570.  
  571. I definitely agree with Brian on this point.  That is the one "feature"
  572. of Think C that I truly hate.  I'm taking a compiler design course now
  573. and I am writing a Pascal subset compiler as the semester project (it's coming
  574. along nicely).  One of the issues is that compilers are not only to
  575. compile the code, but also be helpful to the programmer.  The compiler
  576. is a tool to manipulate source code.  Think C needs to be more flexible
  577. in it's error handling so that, as Brian said, we (programmers) do not
  578. have to be 99.999% sure that it will work.  A logfile would be a great
  579. asset to Think C.
  580.  
  581. A logfile would free programmers from the "let's find the next error
  582. and recompile" methodology/rut that Think C FORCES us into.
  583.  
  584. -Brent "Save us from the madness!" Burton
  585. -- 
  586. - ----------------------------------------------------------------------------
  587. Brent P. Burton, N5VMG                                    Computer Sci/Physics
  588. bpb9204@tamsun.tamu.edu                                   Texas A&M University
  589. - ----------------------------------------------------------------------------
  590.  
  591.  
  592.  
  593. - -------------------------
  594.  
  595. From: skip@dispair.stsci.edu (Francis H. Schiffer 3rd)
  596. Subject:  Suggestion to the Developers of Think C
  597. Date: 2 Mar 92 15:10:55 GMT
  598. Organization: ST ScI/SESD
  599.  
  600. In article <1992Feb29.150609.15539@doug.cae.wisc.edu>, jverdega@cae.wisc.edu (Jeffrey Verdegan) writes:
  601. > In article <1992Feb27.223708.20710@aio.jsc.nasa.gov> brian@galileo.jsc.nasa.gov (Brian Donnell) writes:
  602. > >bad coding styles.  I would like to see Think C create a listing of warnings
  603. > >
  604. > >I would also like Think C to get way from this 'stop on the first error'
  605. > >nonsense.  Write it all out to a log file - so that I can leave a long
  606. > >compile unattended w/o being 99.999% sure that there will be no errors.
  607. > >
  608. > >What does everyone else think?
  609. > I agree 10^6% !!!!
  610.  
  611. Gee, am I the only Think C programmer that uses the Check Syntax command?
  612. I generally check each module as I write/modify it and so usually have a better
  613. than 99% chance that the full compile will run without error.  I _like_ the
  614. ability to code/compile/test a little.  I do agree that a Lint function would
  615. be much appreciated, maybe implemented in the same manner as the current
  616. precompile function.
  617.  
  618. - -----------------------------------------------------------------------
  619. Francis H. Schiffer 3rd    schiffer@stsci.edu | - Any opinions are mine -
  620. skip@dispair.stsci.edu       stscic::schiffer | Not a programmer, just a
  621. skip@cexsels.gsfc.nasa.gov   iuegtc::schiffer |    user who programs
  622. - -----------------------------------------------------------------------
  623.  
  624.  
  625.  
  626. - -------------------------
  627.  
  628. From: leue@galen.crd.ge.com (Bill Leue)
  629. Subject:  Suggestion to the Developers of Think C
  630. Date: 2 Mar 92 16:34:43 GMT
  631. Organization: General Electric Research & Development
  632.  
  633.  
  634. Sorry if I'm repeating what others have already said; I'm coming into this discussion
  635. in the middle.
  636.  
  637. My current wishlist includes:
  638.  
  639. a) Symbolic addresses in disassembled code listing.  WHY does the current
  640. disassembler only include numeric offsets for variables?!?  After all, the
  641. disassembler presumably has the symbol table available for reference. Doesn't
  642. it make a lot more sense for the computer to do the translation from numeric
  643. offsets to variables than for us to spend hours groveling over the code?
  644.  
  645. b) More stability and better documentation on internal errors.  I wasted a whole
  646. day trying to cure an "Internal Error (ZREF) - Remove all Object Files" error.
  647. Not only is this error (and other internal errors) completely undocumented, but
  648. removing the object files doesn't help.  The only cure I could find was to
  649. trash and rebuild the project file.  What's even worse is that the reason that
  650. the project file got corrupted in the first place is that I killed a compile
  651. with a "Command-.".  This seems to be a guaranteed way of clobbering your
  652. project file.
  653.  
  654. c) A better debugger, particularly some ability to help when you get an
  655. unexpected error such as a Bus error or address error.  Just dumping the PC
  656. isn't really too helpful.  How about position the cursor at or near the
  657. offending line of code?
  658.  
  659. -Bill Leue
  660. leue@crd.ge.com
  661.  
  662.  
  663.  
  664.  
  665. - -------------------------
  666.  
  667. From: jverdega@cae.wisc.edu (Jeffrey Verdegan)
  668. Subject:  Suggestion to the Developers of Think C
  669. Date: 2 Mar 92 16:45:57 GMT
  670. Organization: Computer Aided Engineering, Univ. of Wisconsin-Madison
  671.  
  672. I guess I was a little hasty in my enthusiastic support of getting rid of the
  673. "stop on every error" feature.  Making it an option would definitely be cool.
  674.  
  675. A lot of people have alluded to the fact that one of THINK's greatest advantages
  676. is its speed, and claimed that features such as continuing upon finding an 
  677. error or generating warnings would slow it down.  I'm surprised we haven't heard
  678. from Rich Siegel or Phil Shapiro on this one.  So, how 'bout it guys?  Would
  679. such additions sacrifice some core aspect of TC that is key to its speed?  Or
  680. is that area classified?
  681.  
  682. As long as we're wishing, I love the Disassemble feature, but call me lazy, it
  683. would be rilly rilly nice if it would show me which line of C source generated
  684. each line of Assembly.  I seem to remember reading recently about such a
  685. goody for MPW.
  686.  
  687.  
  688. Jeff
  689.  
  690.  
  691. - --------
  692.  
  693. Jeff Verdegan
  694. University of Wisconsin-Madison
  695. Computer-Aided Engineering Center
  696. jjv@caestaff.engr.wisc.edu
  697. (608) 263-1875
  698.  
  699.  
  700.  
  701. - -------------------------
  702.  
  703. From: brian@galileo.jsc.nasa.gov (Brian Donnell)
  704. Subject:  Suggestion to the Developers of Think C
  705. Date: 2 Mar 92 16:40:30 GMT
  706. Organization: NASA/JSC
  707.  
  708. In article <92061.024838CXT105@psuvm.psu.edu>, CXT105@psuvm.psu.edu (Christopher Tate) writes:
  709. > <Begin obligitory pedantic mode>
  710. > If it takes the compiler that much time to run into an error, then you
  711. > may really want to split the project into smaller files.  [I'll admit
  712. > that I'm a big fan of the "write a little bit, then compile it again to
  713. > see if it still works" approach to programming.  THINK C's speed makes
  714. > this possible.]
  715. > <End pedantic mode>
  716.  
  717. Splitting the project into smaller files does not solve the problem, for Think
  718. C stops the entire "make" at the first file where the first error occurs.
  719. Even considering the arguments that others have made about the effects of
  720. on the speed of compilation made by error recovery, Think C could at least
  721. try every file on a make so that I could see the first error from every file.
  722. What if I'm compiling 100 modules and there are no errors except on line 100
  723. of the third one?  I walk away expecting the compile to take about 30 minutes
  724. (pretty good - Think C wins high marks)...but come back to discover it failed
  725. after a minute and a half.  Grrr.
  726.  
  727. Actually - after reading the plethora of responses (geez :-)), I agree that
  728. a separate 'lint' like utility would be a better approach than integrating
  729. it directly with the compiler and thus sacrificing that beautiful race-car
  730. effect.
  731.  
  732. I guess I'm up to $0.04 now... :-)
  733.  
  734. Brian Donnell
  735. NASA/JSC
  736.  
  737.  
  738.  
  739. - -------------------------
  740.  
  741. From: Joe.Francis@dartmouth.edu (Joe Francis)
  742. Subject:  Suggestion to the Developers of Think C
  743. Date: 2 Mar 92 18:55:13 GMT
  744. Organization: Dartmouth College, Hanover, NH
  745.  
  746. In article <44141@dime.cs.umass.edu>
  747. chait@cs.umass.edu writes:
  748.  
  749. > >    If they wan't to keep a market, they have to give it what it
  750. > >    wants, not what they think is good for them.  The market wants
  751. > >    C++; it wants it yesterday.  [Paul Lucas]
  752.  
  753. > Who is the market?  I don't need full C++.  If you are serious about OOP,
  754. > you'll be using SmallTalk or CLOS (real object systems) and not a language
  755. > that was force-fed object ideas.  The market wants better OOP development
  756. > tools, languages, etc.  C++ will probably go away, but I'm willing to bet
  757. > we'll see the next gereation of languages like CLOS for a long time yet.
  758. [chait@cs.umass.edu]
  759.  
  760. The market is Paul Lucas, and myself, and a host of other mac software
  761. developers.  You are incorrect about what many OOP programmers want. 
  762. Many want an OOP development environment that:
  763. 1) doesn't get OOP in their way when they don't need it.
  764. 2) gives them reasonable execution and code size.
  765. 3) let's you create standalone mac applications.
  766. 4) generates object that a mere mortal can follow in macsbug.
  767. 5) was here yesterday - strike that: was here last year.
  768. Guess what?  Think C and MPW C++ are the two answers to those
  769. questions.  Not SmallTalk.  I know; I bought DigiTalk's product because
  770. their advertising failed to mention that you could not create
  771. standalone mac apps.  Now, years later, they can do it (for an upgrade
  772. fee of course).  In the meantime, I've actually accomplished something
  773. useful with MPW C++.
  774.  
  775. You can say C++ was force fed objects.  Or you can say that SmallTalk
  776. was stripped of the fundamentals.  I know which is better for my needs.
  777.  
  778.  
  779.  
  780. - -------------------------
  781.  
  782. From: chait@cs.umass.edu
  783. Subject:  Suggestion to the Developers of Think C
  784. Date: 2 Mar 92 19:25:03 GMT
  785. Organization: COINS, UMass, Amherst
  786.  
  787. In article <10052@tamsun.tamu.edu>, bpb9204@tamsun.tamu.edu (Brent) writes...
  788. >I definitely agree with Brian on this point.  That is the one "feature"
  789. >of Think C that I truly hate.  I'm taking a compiler design course now
  790. >. . . . 
  791. >A logfile would free programmers from the "let's find the next error
  792. >and recompile" methodology/rut that Think C FORCES us into.
  793.  
  794. I have to disagree with Bren on this point for the same reason that has been
  795. pointed up numerous times: having it stop is advantageous in most cases.
  796. One thing I always hated about MPW was letting it compile for ten minutes, only
  797. to find some hundred errors, all cascading off of one or two minor problems.
  798. Logfiles do not IMHO make programming easier, it just forces you to compile
  799. the whole darn file before finding out what's wrong.  If anything, I program
  800. faster in Think C because of the quick find-and-fix-error system.
  801.  
  802. And to Brian: I don't normally have 100 files to recompile, because I'm working
  803. error by error, rather than making changes to 100 files and seeing if they
  804. worked out correctly.  I really think I get my code up and running faster
  805. because of it...
  806.  
  807. I will agree with one point: we're at least up to $.04 if not more! ;)
  808.  
  809. Dave Chait
  810. Chief Architect
  811. Future Generation Software
  812.  
  813.  
  814.  
  815. - -------------------------
  816.  
  817. From: Michael_Hecht@mac.sas.com (Michael Hecht)
  818. Subject:  Suggestion to the Developers of Think C
  819. Date: 2 Mar 92 19:45:43 GMT
  820. Organization: SAS Institute Inc.
  821.  
  822. In article <92061.024838CXT105@psuvm.psu.edu>,
  823.  CXT105@psuvm.psu.edu (Christopher Tate) writes:
  824. >
  825. >In article <1992Feb27.223708.20710@aio.jsc.nasa.gov>,
  826. > brian@galileo.jsc.nasa.gov (Brian Donnell) says:
  827. > >
  828. > >I would like to see Think C create a listing of warnings similar to other
  829. > >compilers that includes things such as: unused variables, [...]
  830.  
  831. I'd like to go a step further and have THINK C generate a complete link
  832. map for me. It would include all references to functions, statics, globals,
  833. and autos. This would not only let me track down unused variables, but it
  834. would assist me in determining call tree dependencies, so I know what code
  835. is going to break when I change a parameter, etc. THINK C 5.0 adds the
  836. segment map, which is good, but that's not what I'm talking about here.
  837.  
  838. > >I would also like Think C to get way from this 'stop on the first error'
  839. > >nonsense.  Write it all out to a log file - so that I can leave a long
  840. > >compile unattended w/o being 99.999% sure that there will be no errors.
  841. > I remember hearing from someone in some sort of semi-official capacity
  842. > say that making THINK C try to compensate for errors and continue its
  843. > compilation would require a major rewrite, and would slow it down
  844. > significantly.
  845.  
  846. Yes, but how about this--instead of listing all errors found in each
  847. source file, how about only listing the FIRST error in a source file,
  848. stopping its compilation, then moving on to the next source file? If the
  849. error occurs in a header file, then, of course, there's no need to compile
  850. any other files that also include that header. This shouldn't require
  851. major structural changes to the compiler.
  852.  
  853. I agree with you that the "stop on first error" behavior is quite acceptable
  854. (and preferred!) when you're in a tight development cycle, but when I change
  855. a bunch of source and want it to compile 100 files while I'm at lunch, I get
  856. real aggravated when I return to find that it stopped on the first one
  857. because of a missing semicolon or such.
  858.  
  859. > I want disassembled code to have actual variable names instead of the
  860. > "0x0000(A5)" that it currently uses.  Just having the actual offsets
  861. > would be nice, instead of always using 0x0000.  Also, I don't see why
  862. > a file that's already been compiled has to be *recompiled* just to get
  863. > a disassembly.
  864.  
  865. I agree that the disassembly could be nicer. Variable names or offsets
  866. would be good. Embedded source code would be even better. I heard Phil
  867. Shapiro speak about this a few months ago, and he said that the disassembly
  868. feature is mostly a hack--it's done after code generation and optimization,
  869. not during. Now admittedly, it would be difficult to match up instructions
  870. to source at this point (especially after global optimizations), UNLESS
  871. you have debugging information available. The debugger knows how to find
  872. a line of source from a code offset, so it stands to reason that this
  873. information could be used by Disassemble, if the file has been compiled with
  874. debugging enabled. Or, for that matter, since Disassemble always recompiles
  875. the code anyway, it could "pretend" that debugging was enabled even if it
  876. wasn't.
  877.  
  878.  
  879. As for the rest of my wish list:
  880.  
  881. *  Support for multi-programmer projects, including code check-in, check-out.
  882.    "Projector-aware" just doesn't cut it. I bought THINK C so I wouldn't need
  883.    MPW. A multi-programmer software license should go with it, of course.
  884.  
  885. *  The features of THINK Back (great hack, Phil!) incorporated into THINK C.
  886.    Also make "Use Disk" backgroundable.
  887.  
  888. *  The ability to manipulate project files in groups--moving to different
  889.    segments, deleting, moving from "project" tree to <system> tree, etc.
  890.  
  891.  
  892. All of the items mentioned so far in this thread were brought up two years
  893. ago at a Symantec languages forum at the WWDC. Most of them were brought up
  894. again at a similar forum that Symantec hosted at January's MacWorld Expo.
  895. Shapiro said it was the same old story of too much work and too few resources.
  896. I develop software too, and I suspect that part of the story is something
  897. that's happened to projects I've worked on: a reluctance to fix the old, and
  898. a preference to work on the new (global optimization, OOP). After all, new
  899. stuff is more exciting! The press doesn't help any; they only want to publish
  900. new feature scorecards.
  901.  
  902. But I've found that sometimes you just have to ignore the press and your own
  903. preferences and really listen to the users' requests to smooth out those
  904. rough edges. I think the overwhelming response to the original poster shows
  905. that Symantec should really think seriously about ironing out these last few
  906. rough edges.
  907.  
  908. --Michael
  909.  
  910. =======================================================================
  911. Michael P. Hecht                 | Internet:  Michael_Hecht@mac.sas.com
  912. SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
  913.  
  914.  
  915.  
  916. - -------------------------
  917.  
  918. From: suitti@ima.isc.com (Stephen Uitti)
  919. Subject:  Suggestion to the Developers of Think C
  920. Date: 2 Mar 92 21:06:56 GMT
  921. Organization: Interactive Systems, Cambridge, MA 02138-5302
  922.  
  923. >> If they [Symantec] want to keep a market, they have to give it what it
  924. >> wants, not what they think is good for them.  The market wants
  925. >> C++; it wants it yesterday.
  926.  
  927. I find it distressing how obnoxiously loud and arrogant many C++
  928. fanatics are.
  929.  
  930. Things that I want in a development environment are, in order:
  931.  
  932.   1.  Implementation of a standard language, to the letter.
  933.       Think C 5 implements a really good ANSI C.
  934.       C++ is not a standard.  It's a moving target.
  935.   2.  Language stability.
  936.       C++ is changing all the time.  Count yourself lucky if
  937.       your code still compiles next year.
  938.   3.  Portability.
  939.       The OOP stuff in Think C 5 is not really portable.
  940.       Neither is C++.
  941.   4.  Speed.
  942.       The compiler has to be able to compile quickly.
  943.       Note that there are human factors to speed.  Under
  944.       thirty seconds, Under a minute, under ten minutes,
  945.       under an hour, and less than ten hours (overnight)
  946.       are targets.  MPW C++ misses anything under a minute.
  947.       I could cope with a super-optimizer that took all
  948.       night.
  949.   5.  Error checking
  950.       It should be able to perform strong type checking,
  951.       catch all language errors, provide "lint" capabilities,
  952.       and catch typical mistakes, such as "if (foo = bar) {..."
  953.       Think C does much, but not all it could.
  954.   6.  Good code quality.
  955.       It should do what you expect.
  956.   7.  Small code
  957.       The code produced should be as small as possible.
  958.       This means that objects can load faster.
  959.       Small code is usually faster, anyway.
  960.   8.  Fast code
  961.       If producing fast code takes a long time, it
  962.       should be optional.
  963.   9.  Debugging.
  964.       Symbolic source debugging, with asm hooks.  Breakpoints,
  965.       good formatting, especially for structures, etc.
  966.       When my app does something it shouldn't, the debugger
  967.       shouldn't crash, and should let me do post crash
  968.       analysis.  Think C has this.  I'm sure it could be
  969.       improved, especially with OOP.  I just don't know how.
  970.   10. Good documentation.
  971.       Manuals should be free from error.  They should be
  972.       easy to use for a relative beginner.  They should be
  973.       easy to reference by a pro.  This is one of the
  974.       harder parts.
  975.   11. Good library support.
  976.       The supplied libraries should enable me to make full
  977.       use of the target hardware.  They should enable fast
  978.       prototyping.  I find the Think C "C" library to be complete,
  979.       flexible (I use ANSI-small, sometimes).  I find TCL
  980.       to be good for prototyping & quick starting.  One thing
  981.       it should be is more modular.  One should be able to
  982.       use some of them independently of the others.  For
  983.       example, I'd like to be able to use CStyleEditText without
  984.       CPrinter.
  985.  
  986. Do I need C++?  Well, currently, I find it is harder to debug
  987. than C.  The indirection is obfuscated.  It is too hard to track
  988. down.  The "call by reference" syntax makes it more difficult to
  989. tell if you are passing a pointer, a copy, or the original variable.
  990.  
  991. Stephen.
  992. suitti@ima.isc.com
  993.  
  994.  
  995.  
  996. - -------------------------
  997.  
  998. From: suitti@ima.isc.com (Stephen Uitti)
  999. Subject:  Suggestion to the Developers of Think C
  1000. Date: 2 Mar 92 22:20:07 GMT
  1001. Organization: Interactive Systems, Cambridge, MA 02138-5302
  1002.  
  1003. >>That [stopping at first error] is the one "feature"
  1004. >>of Think C that I truly hate.
  1005. >>A logfile would free programmers from the "let's find the next error
  1006. >>and recompile" methodology/rut that Think C FORCES us into.
  1007.  
  1008. If you are porting from another platform, or from MPW, or even an
  1009. old version of Think C, having the list of errors might be
  1010. faster.  I just finished the compile portion of porting some
  1011. software that ran (runs) under Think C 3.0.  Here, having the
  1012. compiler grunge through all the files & generate a big list might
  1013. be a win.
  1014.  
  1015. BTW, the "prototype helper" was a big help.  I wish the user interface
  1016. on the "compare" utlitity was better.
  1017.  
  1018. Most of the stuff I do, however, is add a feature, a file, a header,
  1019. and recompile just those things.  Stop on the first error is better
  1020. here.
  1021.  
  1022. At work, I get alot of news read (and written), while MPW compiles -
  1023. even if there are no errors.  Now, compilers could be written that
  1024. are faster, even under MPW.  If a compiler goes from source to
  1025. object directly, rather than in multiple passes writing temp files,
  1026. it will be faster.  This could be done under MPW, it just isn't.
  1027. The Plan 9 people have said this about the UNIX enironment too.
  1028.  
  1029. Stephen.
  1030.  
  1031.  
  1032.  
  1033. - -------------------------
  1034.  
  1035. From: andrews@sp1.csrd.uiuc.edu (John Andrews)
  1036. Subject:  Suggestion to the Developers of Think C
  1037. Organization: UIUC Center for Supercomputing Research and Development
  1038. Date: Tue, 3 Mar 92 01:48:18 GMT
  1039.  
  1040. suitti@ima.isc.com (Stephen Uitti) writes:
  1041. > [Lots of stuff about C vs. C++]
  1042. >The "call by reference" syntax makes it more difficult to
  1043. >tell if you are passing a pointer, a copy, or the original variable.
  1044.  
  1045. >Stephen.
  1046. >suitti@ima.isc.com
  1047.  
  1048. Stephen, I agree with much of your post, but I couldn't let this one go.
  1049. I find that it is not uncommon for me to change something from call by value
  1050. (CBV) to call by reference (CBR) because I discover I have to return a
  1051. modified value of something to the caller.  If a function has X call sites
  1052. and Y uses of a variable in the body, then C makes me change (X+Y+1) lines
  1053. of code, whereas C++ makes me change 1 if I change the variable from CBV to CBR.
  1054. Or, more to the point, I don't *care* if the thing is a pointer or not, I just 
  1055. want to reference it!  The lack of true CBR is one my biggest problems with C.
  1056.  
  1057. --
  1058. John Andrews (andrews@csrd.uiuc.edu) "He who dies with the shortest .sig, wins"
  1059. Graduate Research Assistant, Center for Supercomputing R&D, Urbana, IL
  1060.  
  1061.  
  1062.  
  1063. - -------------------------
  1064.  
  1065. From: glenn@gla-aux.uucp (Glenn Austin)
  1066. Date: Mon, 2 Mar 92 18:10:44 PST
  1067. Organization: The Pit Lane
  1068.  
  1069.  
  1070. In article <1992Mar2.030707.22699@sunb10.cs.uiuc.edu> (comp.sys.mac.programmer), pjl@suna1.cs.uiuc.edu (Paul Lucas) writes:
  1071. >     Also, remember the original Mac commercials?  Specifically, the
  1072. >     one with an IBM PC on a desk and then the hulking user-manual
  1073. >     crashing down next to it; then a Mac, will a thin booklet almost
  1074. >     floating down next to it?  Of course, the situation is reversed
  1075. >     when it comes to programming the thing (case in point: Inside
  1076. >     Macintosh I-VI plus the technotes--end-to-end, it's about s foot
  1077. >     thick).  In order to program the Mac (and even Apple has said
  1078. >     this), you're going to need OOP.
  1079.  
  1080. And the equivalent documentation to write in a graphic environment on the
  1081. PC takes an entire 3-shelf bookshelf.  Still sounds like a better deal to
  1082. me to work on the Mac...
  1083.  
  1084. I still haven't heard Apple say, "In order to program the Mac, you need
  1085. OOP."  I HAVE heard, "If you want your program to keep up with the latest
  1086. in Mac OS technology, you should write in MacApp."  IMHO, this is an entirely
  1087. different statement.  The first is a requirement, and the second a
  1088. recommendation.
  1089.  
  1090.  
  1091. ===============================================================================
  1092. | Glenn L. Austin                | "Turn too soon, run out of room.           |
  1093. | Macintosh Wizard and           |    Turn too late, much better fate."       |
  1094. | Auto Racing Driver             |   -- Jim Russell Racing School Instructors |
  1095. | Usenet:  glenn@gla-aux.uucp or glenn%gla-aux.uucp@skinner.cs.uoregon.edu    |
  1096. ===============================================================================
  1097.  
  1098. - -------------------------
  1099.  
  1100. From: glenn@gla-aux.uucp (Glenn Austin)
  1101. Date: Mon, 2 Mar 92 18:22:40 PST
  1102. Organization: The Pit Lane
  1103.  
  1104.  
  1105. In article <1992Mar2.164030.2368@aio.jsc.nasa.gov> (comp.sys.mac.programmer), brian@galileo.jsc.nasa.gov (Brian Donnell) writes:
  1106. > Splitting the project into smaller files does not solve the problem, for Think
  1107. > C stops the entire "make" at the first file where the first error occurs.
  1108.  
  1109. Gee -- so does MPW!  In fact -- I've left a compile for lunch after changing
  1110. a debugging equate so that no more debugging statements are generated, only
  1111. to come back to find that somewhere, I enclosed a closing brace in my #if--#endif
  1112. pair, which now has generated more than a page of spurious errors and warnings.
  1113. It's real fun explaining to my boss why I'm wandering the halls because my
  1114. computer is now crunching code, and that I can't do anything anyway...
  1115.  
  1116. > Even considering the arguments that others have made about the effects of
  1117. > on the speed of compilation made by error recovery, Think C could at least
  1118. > try every file on a make so that I could see the first error from every file.
  1119. > What if I'm compiling 100 modules and there are no errors except on line 100
  1120. > of the third one?  I walk away expecting the compile to take about 30 minutes
  1121. > (pretty good - Think C wins high marks)...but come back to discover it failed
  1122. > after a minute and a half.  Grrr.
  1123.  
  1124. I have the same problem when I work on MPW at work -- the only difference
  1125. is that MPW takes 3 minutes to find the SAME BLOODY ERROR (at least!)  At
  1126. least I have a Magellan '040 in my IIci so that MPW now takes about a minute
  1127. to find the error...
  1128.  
  1129.  
  1130. ===============================================================================
  1131. | Glenn L. Austin                | "Turn too soon, run out of room.           |
  1132. | Macintosh Wizard and           |    Turn too late, much better fate."       |
  1133. | Auto Racing Driver             |   -- Jim Russell Racing School Instructors |
  1134. | Usenet:  glenn@gla-aux.uucp or glenn%gla-aux.uucp@skinner.cs.uoregon.edu    |
  1135. ===============================================================================
  1136.  
  1137. - -------------------------
  1138.  
  1139. From: pjl@sunb6.cs.uiuc.edu (Paul Lucas)
  1140. Organization: University of Illinois at Urbana-Champaign
  1141. Date: Tue, 3 Mar 1992 00:15:44 GMT
  1142.  
  1143. In <1992Mar02.210656.6658@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
  1144.  
  1145. >Things that I want in a development environment are, in order:
  1146.  
  1147. >  1.  Implementation of a standard language, to the letter.
  1148. >      Think C 5 implements a really good ANSI C.
  1149. >      C++ is not a standard.  It's a moving target.
  1150.  
  1151.     If timetables were shifted slightly, say that C wasn't yet
  1152.     standardized, you're complaint about C++ would apply to C as
  1153.     well.
  1154.  
  1155. >  2.  Language stability.
  1156. >      C++ is changing all the time.  Count yourself lucky if
  1157. >      your code still compiles next year.
  1158.  
  1159.     This is an exaggeration.  The biggest change was from 1.2 to
  1160.     2.0; since 2.0, only "minor" semantics have changed; in 3.0 most
  1161.     stuff is an addition (e.g. templates).
  1162.  
  1163. >  4.  Speed.
  1164. >      The compiler has to be able to compile quickly.
  1165. >      Note that there are human factors to speed.  Under
  1166. >      thirty seconds, Under a minute, under ten minutes,
  1167. >      under an hour, and less than ten hours (overnight)
  1168. >      are targets.  MPW C++ misses anything under a minute.
  1169. >      I could cope with a super-optimizer that took all
  1170. >      night.
  1171.  
  1172.     This is not a comparison to MPW.  Just because Apple's C++
  1173.     implementation is slow doesn't mean that all C++ implementations
  1174.     are/will be slow.
  1175.  
  1176. >Do I need C++?  Well, currently, I find it is harder to debug
  1177. >than C.  The indirection is obfuscated.  It is too hard to track
  1178. >down.  The "call by reference" syntax makes it more difficult to
  1179. >tell if you are passing a pointer, a copy, or the original variable.
  1180.  
  1181.     Call-by-reference *ALWAYS* calls-by-reference; what's the
  1182.     problem?  Hence, it's always a pointer in disguise.  By the way,
  1183.     call-by-reference is nothing new; many languages have it and
  1184.     have had it for a while, e.g., Pascal.  Nobody complains about
  1185.     that.
  1186. - -- 
  1187.     - Paul J. Lucas                University of Illinois    
  1188.       AT&T Bell Laboratories        at Urbana-Champaign
  1189.       Naperville, IL            pjl@cs.uiuc.edu
  1190.  
  1191. - -------------------------
  1192.  
  1193. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  1194. Organization: Integrated Systems Laboratory, ETH, Zurich
  1195. Date: 3 Mar 92 13:03:53
  1196.  
  1197. In article <1992Mar02.210656.6658@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
  1198. >  1.  Implementation of a standard language, to the letter.
  1199. >      Think C 5 implements a really good ANSI C.
  1200. >      C++ is not a standard.  It's a moving target.
  1201.  
  1202. ... soon to be a standard, onlike the Think OOP extensions.
  1203.  
  1204. >  2.  Language stability.
  1205. >      C++ is changing all the time.  Count yourself lucky if
  1206. >      your code still compiles next year.
  1207.  
  1208. This is not true. C++ *is* changing, but you would have a hard time finding a
  1209. C++ program that compiled under an older version and wouldn't compile under a
  1210. newer one.
  1211.  
  1212. >  3.  Portability.
  1213. >      The OOP stuff in Think C 5 is not really portable.
  1214. >      Neither is C++.
  1215.  
  1216. MPW C++ has, of course, some extensions which are non-portable. It is, however,
  1217. possible to write portable object oriented programs in C++, which isn't
  1218. possible in Think C. (But portability is not that high on my list).
  1219.  
  1220. >  4.  Speed.
  1221. >      The compiler has to be able to compile quickly.
  1222. >      Note that there are human factors to speed.  Under
  1223. >      thirty seconds, Under a minute, under ten minutes,
  1224. >      under an hour, and less than ten hours (overnight)
  1225. >      are targets.  MPW C++ misses anything under a minute.
  1226. >      I could cope with a super-optimizer that took all
  1227. >      night.
  1228.  
  1229. True, but this has nothing to do with the language.
  1230.  
  1231. Matthias
  1232.  
  1233. - -----
  1234. Matthias Neeracher                                      neeri@iis.ethz.ch
  1235.  `We say "gestalt" when things combine to act in ways we can't explain'
  1236.                              -- Marvin Minsky, _The Society Of Mind_
  1237.  
  1238. - -------------------------
  1239.  
  1240. From: Pete.Gontier@p811.f70.n109.z1.fidonet.org (Pete Gontier)
  1241. Date: Tue, 03 Mar 1992 00:09:20 -0500
  1242.  
  1243.  CT> From: Christopher Tate <CXT105@psuvm.psu.edu>
  1244.  
  1245.  CT> Indeed; some people don't *want* C++.  I'm fully aware that that's a
  1246.  CT> heretical statement in some circles, but *expert* opinion is more divided
  1247.  CT> on C++ than many people realize.
  1248.  
  1249. Eiffel! Eiffel! Coming to an MPW near you next month or the month after!
  1250. (Does this make mine an expert opinion? :-)
  1251.  
  1252.  CT> Certainly it can be a powerful tool
  1253.  CT> for establishing maintainability or for designing a program structure,
  1254.  CT> but it's not really any "easier" to use OOP; it's a subtle skill that
  1255.  CT> some programmers are simply not comfortable with.
  1256.  
  1257. Well, that's not really much of an excuse, as long as the objects are
  1258. a bag on the side of a procedural language, like C++.
  1259.  
  1260.  CT> And [he says, climbing out on a limb] it's not necessarily the "wave of
  1261.  CT> the future" that so many people (both well- and ill-informed) seem to
  1262.  CT> think.
  1263.  
  1264. Maybe I'm stupid, but I have to wonder what else might be.
  1265.  
  1266.  CT> I'd like to have some of the CMarker functionality built into the
  1267.  CT> editor -- especially the little menu to pull down that gives you a
  1268.  CT> list of all functions in the document, in order to jump to them.
  1269.  
  1270. There's an app called MarkerMaker floating around on some of the pay services.
  1271. Supports "drag and drop" of entire folders. Free. I use it every day. Allows
  1272. you to make Command-Click-Hold sequences in source window title bars actually
  1273. useful, and without hacks. If this little app is not on sumex, it should be.
  1274. (I'd put it there, but there's this little problem with my network...)
  1275.  
  1276.  CT> I'd like to be able to edit generic text files without requiring a
  1277.  CT> project file to be open.
  1278.  
  1279. Suggested by many, rejected often. Turns out this is a big rewrite. Don't
  1280. ask me why, I just remember a THINKer posting that.
  1281.  
  1282.  CT> I'd *especially* like to search/replace in files that aren't in the
  1283.  CT> current project.
  1284.  
  1285. Dunno how the UI would work, but me too.
  1286.  
  1287. - -------------------------
  1288.  
  1289. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  1290. Organization: Kalamazoo College
  1291. Date: Tue, 3 Mar 1992 15:21:58 GMT
  1292.  
  1293. glenn%gla-aux.uucp@skinner.cs.uoregon.edu writes:
  1294. >pjl@suna1.cs.uiuc.edu (Paul Lucas) writes:
  1295. >>     ... the situation is reversed
  1296. >>     when it comes to programming the thing (case in point: Inside
  1297. >>     Macintosh I-VI plus the technotes--end-to-end, it's about s foot
  1298. >>     thick).
  1299.  
  1300. 18 3/8", to be precise.
  1301.  
  1302. >And the equivalent documentation to write in a graphic environment on the
  1303. >PC takes an entire 3-shelf bookshelf.  Still sounds like a better deal to
  1304. >me to work on the Mac...
  1305.  
  1306. For example, the Microsoft Mouse programmer's book -- the technical work
  1307. that explains how to program with the mouse -- is as thick as IM4.
  1308. And don't think for a second that all your customers' mice will be
  1309. Microsoft-compatible.
  1310.  
  1311. My opinion;  I speak for myself.
  1312. - -- 
  1313.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  1314.  Kzoo randomly kills all my mail;  if I don't acknowledge, try resending.    
  1315.  
  1316. - -------------------------
  1317.  
  1318. From: Michael_Hecht@mac.sas.com (Michael Hecht)
  1319. Date: 3 Mar 92 14:56:49 GMT
  1320. Organization: SAS Institute Inc.
  1321.  
  1322. In article <44202@dime.cs.umass.edu>, chait@cs.umass.edu writes:
  1323. > And to Brian: I don't normally have 100 files to recompile, because I'm working
  1324. > error by error, rather than making changes to 100 files and seeing if they
  1325. > worked out correctly.  I really think I get my code up and running faster
  1326. > because of it...
  1327.  
  1328. Dave, I think most of us work that way. But there are still occasions when
  1329. you can end up with an enormous number of files to recompile. For example,
  1330. say you change two files: you add a field to a structure in some header file
  1331. and you add some code to use that structure in some c file. But, you introduce
  1332. a syntax error into the c file. You hit Update and walk away. THINK C suddenly
  1333. has 100 files to recompile because of the changed header. Unfortunately,
  1334. everything stops when it gets to the c file with the syntax error.
  1335.  
  1336. Because of this, I've gotten into the habit of recompiling specific c files
  1337. that I've changed, before I do a big update. I'd prefer having an error log
  1338. that just lists the first error found in each unsuccessful compile.
  1339.  
  1340. The same thing can occur if you're working with a team of programmers. Someone
  1341. else's source code compiles just fine on their machine, but because of a
  1342. header file they forgot to update, your recompile of the 100 source files they
  1343. just checked in fails. Of course, a real multi-user programming environment
  1344. would help this situation immensely :-).
  1345.  
  1346. As for some of the other suggestions that have been floating around, if
  1347. Symantec doesn't have the resources to add everything we want, maybe they
  1348. could open up the THINK environment so we could add our own tools. Maybe
  1349. they could provide us with the format of a project file, or with a "Project
  1350. Manager" library of routines for access, or with a suite of AppleEvents for
  1351. manipulating them. Maybe they could make the various components of the
  1352. environment more modular, and communicate between them with AppleEvents, so
  1353. we could plug in replacements or enhancements for certain parts.
  1354.  
  1355. - --Michael
  1356.  
  1357. =======================================================================
  1358. Michael P. Hecht                 | Internet:  Michael_Hecht@mac.sas.com
  1359. SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
  1360.  
  1361. - -------------------------
  1362.  
  1363. From: lai@Apple.COM (Ed Lai)
  1364. Date: 3 Mar 92 21:59:49 GMT
  1365. Organization: Apple Computer Inc., Cupertino, CA
  1366.  
  1367. In article <zkessin.699324675@chaos.cs.brandeis.edu> zkessin@chaos.cs.brandeis.edu (Zach Kessin) writes:
  1368. >
  1369. >How about using apple-events to control the environment, you could use
  1370. >whatever editor you wanted, and have it tell think C to compile or
  1371. >link bring up the class browser. Also you could have think Pascal use
  1372. >the same apple-events so that you could use one editor with both.
  1373. >
  1374.  
  1375. It should be pointed out similar work has already been done on MPW. There
  1376. is an application called ToolServer that let you run any MPW tool through
  1377. Apple Event. You can also do it to MPW 3.3 except that getting the result
  1378. back is more difficult. THINK should do the same thing.
  1379.  
  1380. While we are on the subject of what THINK should do, the distinction
  1381. between a compiled language such as C/PASCAL and an interpreter language
  1382. such as BASIC is blurred, There is no reason why we cannot use it as a
  1383. scripting language where we keep the source file intact, but we can double
  1384. click on the source file directly to run the program.
  1385.  
  1386. /* Disclaimer: All statments and opinions expressed are my own */
  1387. /* Edmund K. Lai                                               */
  1388. /* Apple Computer, MS37-UP                                     */
  1389. /* 20525 Mariani Ave,                                          */
  1390. /* Cupertino, CA 95014                                         */
  1391. /* (408)974-6272                                               */
  1392. zW@h9cOi
  1393.  
  1394. - -------------------------
  1395.  
  1396. From: brian@galileo.jsc.nasa.gov (Brian Donnell)
  1397. Date: 3 Mar 92 22:03:22 GMT
  1398. Organization: NASA/JSC
  1399.  
  1400. In article <44202@dime.cs.umass.edu>, chait@cs.umass.edu writes:
  1401. > And to Brian: I don't normally have 100 files to recompile, because I'm working
  1402. > error by error, rather than making changes to 100 files and seeing if they
  1403. > worked out correctly.  I really think I get my code up and running faster
  1404. > because of it...
  1405.  
  1406. You can change just a few files and have this scenario bite you.  For example,
  1407. say I change one header (.h) file that all my source (.c) files depend on,
  1408. and assume I make no mistakes.  I also change one source file and make one
  1409. stupid syntax error that I do not notice.  Knowing that I have changed that
  1410. crucial header file, I start the compile and go down the hall to run another
  1411. errand.  Unfortunately, the make halts at the error in that bad source
  1412. file and all that multitasking effort was for naught.  Bleech.
  1413.  
  1414. Brian
  1415.  
  1416. - -------------------------
  1417.  
  1418. From: ajr3@quads.uchicago.edu (Alain Roy)
  1419. Date: 3 Mar 92 22:25:48 GMT
  1420. Organization: University of Chicago Computing Organizations
  1421.  
  1422. In article <1992Mar3.001544.1602@sunb10.cs.uiuc.edu> pjl@sunb6.cs.uiuc.edu (Paul Lucas) writes:
  1423. >In <1992Mar02.210656.6658@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
  1424. >
  1425. >    Call-by-reference *ALWAYS* calls-by-reference; what's the
  1426. >    problem?  Hence, it's always a pointer in disguise.  By the way,
  1427. >    call-by-reference is nothing new; many languages have it and
  1428. >    have had it for a while, e.g., Pascal.  Nobody complains about
  1429. >    that.
  1430. >-- 
  1431.  
  1432. I complain about it! What I complain about is not so much the idea
  1433. of call by reference, but the syntax of it. As you said, it's "a pointer
  1434. in disguise." When I'm working on a large project and I look at a function
  1435. call, I may not always remember that the call was call by reference unless
  1436. I use a pointer. And then a variable can be changed under my nose. This has
  1437. always been a gripe of mine about C++ and Pascal. When I pass something
  1438. by reference in C however, I use the & operator and then it is really
  1439. obvious to me. Call by reference just doesn't look different, and I wish
  1440. it did, to assist my fallible memory.
  1441.  
  1442. sorry, just one of my pet peeves.
  1443.  
  1444. >    - Paul J. Lucas                University of Illinois    
  1445. >      AT&T Bell Laboratories        at Urbana-Champaign
  1446. >      Naperville, IL            pjl@cs.uiuc.edu
  1447.  
  1448. Alain Roy
  1449. ajr3@midway.uchicago.edu
  1450.  
  1451. - -------------------------
  1452.  
  1453. From: pjl@suna1.cs.uiuc.edu (Paul Lucas)
  1454. Organization: University of Illinois at Urbana-Champaign
  1455. Date: Wed, 4 Mar 1992 00:24:07 GMT
  1456.  
  1457. In <1992Mar3.222548.26710@midway.uchicago.edu> ajr3@quads.uchicago.edu (Alain Roy) writes:
  1458.  
  1459. >In article <1992Mar3.001544.1602@sunb10.cs.uiuc.edu> pjl@sunb6.cs.uiuc.edu (Paul Lucas) writes:
  1460. >>In <1992Mar02.210656.6658@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
  1461. >>
  1462. >>    Call-by-reference *ALWAYS* calls-by-reference; what's the
  1463. >>    problem?  Hence, it's always a pointer in disguise.  By the way,
  1464. >>    call-by-reference is nothing new; many languages have it and
  1465. >>    have had it for a while, e.g., Pascal.  Nobody complains about
  1466. >>    that.
  1467. >>-- 
  1468.  
  1469. >I complain about it! What I complain about is not so much the idea
  1470. >of call by reference, but the syntax of it. As you said, it's "a pointer
  1471. >in disguise." When I'm working on a large project and I look at a function
  1472. >call, I may not always remember that the call was call by reference unless
  1473. >I use a pointer. And then a variable can be changed under my nose. This has
  1474. >always been a gripe of mine about C++ and Pascal. When I pass something
  1475. >by reference in C however, I use the & operator and then it is really
  1476. >obvious to me. Call by reference just doesn't look different, and I wish
  1477. >it did, to assist my fallible memory.
  1478.  
  1479.     That's why there are such things as const references.  If the
  1480.     programmers who wrote the function used const referneces, then
  1481.     there's no need for you to know, i.e., it's just an efficiency
  1482.     measure.
  1483.  
  1484.     References also have a couple of "cool" advantages like allowing
  1485.     an object to be an l-value and allow allowing functions to be
  1486.     "chained" together.
  1487.  
  1488.     If a function does alter it's arguments, then you can still use
  1489.     the (real) pointer notation.  I'm not sure, but I think that
  1490.     Bjarne advocates (advocated?) this last point.
  1491. - -- 
  1492.     - Paul J. Lucas                University of Illinois    
  1493.       AT&T Bell Laboratories        at Urbana-Champaign
  1494.       Naperville, IL            pjl@cs.uiuc.edu
  1495.  
  1496. - -------------------------
  1497.  
  1498. From: Pete.Gontier@p811.f70.n109.z1.fidonet.org (Pete Gontier)
  1499. Date: Tue, 03 Mar 1992 22:39:05 -0500
  1500.  
  1501.  GA> From: glenn@gla-aux.uucp (Glenn Austin)
  1502.  
  1503.  GA> It's real fun explaining to my boss why I'm wandering the halls because
  1504.  GA> my computer is now crunching code, and that I can't do anything anyway...
  1505.  
  1506. Bosses are always convinced there's something you can do while your
  1507. compiler is running. As if you have all your code memorized and it's
  1508. just a matter of discipline to continue editing in your head.
  1509.  
  1510. Isn't there another group for complaining about one's boss? Oh well.
  1511. In a couple of weeks or so we'll have a real UseNet bridge and I'll start
  1512. reading it again.
  1513.  
  1514. - -------------------------
  1515.  
  1516. From: spencer@panix.com (David Spencer)
  1517. Date: Wed, 4 Mar 1992 13:45:48 GMT
  1518. Organization: PANIX Public Access Unix, NYC
  1519.  
  1520. In <699636657.F00003@blkcat.UUCP> Pete.Gontier@p811.f70.n109.z1.fidonet.org (Pete Gontier) writes:
  1521.  
  1522. > CT> I'd *especially* like to search/replace in files that aren't in the
  1523. > CT> current project.
  1524.  
  1525. >Dunno how the UI would work, but me too.
  1526.  
  1527. A dialog box with buttons for all the options constructs a command
  1528. line in an editable text box. You can select the files with a file
  1529. dialog (I love TC5's add-to-project dialog) or type the file names or
  1530. globbing pattern in the command line text box. For an example, check
  1531. out a/ux commandos.
  1532.  
  1533. David Spencer
  1534. spencer@panix.com
  1535.  
  1536.  
  1537. - -------------------------
  1538.  
  1539. From: patf@mentorg.com (Pat Fortner @ PCB/N x1248)
  1540. Date: 4 Mar 92 19:52:50 GMT
  1541. Organization: engr
  1542.  
  1543. Many of the suggestions I've seen would be very helpful to me.  But one
  1544. I haven't seen mentioned yet is any sort of source code management
  1545. within Think C.  I am seriously considering buying the MPW shell simply
  1546. for Projector.  While my code is in the early stages of a new project,
  1547. files change rapidly and checking them in and out can be a nuisance.  But
  1548. when things begin to stabilize, checking source and header files in and
  1549. out, being able to name and recall past versions, create branches, etc
  1550. is something I sorely miss.
  1551.  
  1552. Pat
  1553.  
  1554. (PS Is there ANYTHING out there in MacLand other than Projector that does
  1555. this? )
  1556. - -- 
  1557. - ------------------------------------------------------------------------------
  1558. Patrick Fortner
  1559. Mentor Graphics Corporation
  1560. 8005 SW Boeckman Road
  1561.  
  1562. - -------------------------
  1563.  
  1564. From: Joe.Francis@dartmouth.edu (Joe Francis)
  1565. Date: 4 Mar 92 23:22:59 GMT
  1566. Organization: Dartmouth College, Hanover, NH
  1567.  
  1568. In article <1992Mar3.222548.26710@midway.uchicago.edu>
  1569. ajr3@quads.uchicago.edu (Alain Roy) writes:
  1570.  
  1571. > I complain about it! What I complain about is not so much the idea
  1572. > of call by reference, but the syntax of it. As you said, it's "a pointer
  1573. > in disguise." When I'm working on a large project and I look at a function
  1574. > call, I may not always remember that the call was call by reference unless
  1575. > I use a pointer. And then a variable can be changed under my nose. This has
  1576. > always been a gripe of mine about C++ and Pascal. When I pass something
  1577. > by reference in C however, I use the & operator and then it is really
  1578. > obvious to me. Call by reference just doesn't look different, and I wish
  1579. > it did, to assist my fallible memory.
  1580.  
  1581. I agree, but this is really only a problem in C++ when you are forced
  1582. to use someone elses code, and it uses references.  If you are writing
  1583. your own C++ code, folow this simple rule: DON'T USE REFERENCES! 
  1584. References (for the reason you state) are more pain than gain except in
  1585. very specific circumstances (like defining the "+" operator for a
  1586. class, for instance).  And in those specific circumstances, it is easy
  1587. to remember that it you have a reference.  In Pascal, it's difficult to
  1588. avoid references.  In C++, it's easy.
  1589.  
  1590. +++++++++++++++++++++++++++
  1591.  
  1592. From: scott@mcl.mcl.ucsb.edu (Scott Bronson)
  1593. Date: 6 Mar 92 20:00:47 GMT
  1594.  
  1595. I would like to see a few things about the environment automated.
  1596.  
  1597. The new settings dialog is huge.  Whenever I'm going from alpha to beta,
  1598. I always forget an option or two, and this requires a complete re-compile.
  1599. Same with going from beta to gold.  I would like very much to have a pop
  1600. up menu in the project dialog that specifies what stage the project is in,
  1601. and sets the options accordingly.  This way I wouldn't forget to turn off
  1602. the MacsBug names before creating a gold release.
  1603.  
  1604. I would like to see THINK C automatically handle SIZE and VERS resouces.
  1605. Seems like these are so dependent on the compile and stage that the
  1606. project is in that it doesn't make sense to have to exit out to ResEdit
  1607. to edit them.  If they were a part of the project file, I would be happy.
  1608.  
  1609. Finally, I would really like the C debugger to be as capable as LightsBug
  1610. is in Pascal.  C is a lower level language than Pascal, yet it has none
  1611. (or very few) of the low-level machine-specific features of LightsBug.
  1612. I find it interesting that the C debugger would be at home on any machine--
  1613. you could use its interface with no changes on anything from PC to an Iris.
  1614. This does say that perhaps it doesn't embrace the Macintosh as well as it
  1615. could.
  1616.  
  1617. Support for MPW tools and automatic conversion of string literals in your
  1618. source file into STR resources would also be great.
  1619.  
  1620.     - Scott
  1621.  
  1622. +++++++++++++++++++++++++++
  1623.  
  1624. From: ksand@apple.com (Kent Sandvik)
  1625. Date: 6 Mar 92 20:34:03 GMT
  1626. Organization: MacDTS Mongols
  1627.  
  1628. In article <44141@dime.cs.umass.edu>, chait@cs.umass.edu writes:
  1629. > There hasn't been any C++ 'features' that I have needed and haven't been able
  1630. > to get along without.  C++ seriously munges programming style more and more,
  1631. > especially letting you declare vars anywhere in your code (the reason for
  1632. > putting them at the top of a fn was readibility, and boy is readibility
  1633. > losing it in c++!). 
  1634.  
  1635. Well, something like
  1636. for(int i; i == 10; i++)
  1637.  
  1638. is far more readable than having the i declared pages of text before the 
  1639. for loop, or what...
  1640.  
  1641.  
  1642. > Who is the market?  I don't need full C++.  If you are serious about OOP,
  1643. > you'll be using SmallTalk or CLOS (real object systems) and not a language
  1644. > that was force-fed object ideas.  The market wants better OOP development
  1645. > tools, languages, etc.  C++ will probably go away, but I'm willing to bet
  1646. > we'll see the next gereation of languages like CLOS for a long time yet.
  1647.  
  1648. I'm a DLE (see .signature below), however for the moment we don't have the 
  1649. possible development platforms to effectively write horizontal applications
  1650. using CLOS or SmallTalk. This will happen, sooner or later anyway. So C++
  1651. is unfortunately a viable alternative just now, mostly because it does not
  1652. produce any penalties concerning the final binary. Anyway,I also hope that
  1653. C++ is the last of the dying breed of static and non-orthogonal languages.
  1654.  
  1655. > The entire Symantec Languages Group should be commended for their work.  They
  1656. > are a tiny group for what they are handling, and they are effectively
  1657. > competing against Apple (MPW).
  1658.  
  1659. I hope there's no real competition between MPW and Think, they both have
  1660. their own market shares, and that's a good thing for both companies.
  1661.  
  1662. Cheers,
  1663. Kent
  1664.  
  1665. - --
  1666. Kent Sandvik - Apple DTS  - Dynamic Language Evangelist
  1667. ksand@apple.com
  1668. All opinions expressed are my own, and not related to any company or
  1669. organization.          
  1670. Have fun!
  1671.  
  1672. +++++++++++++++++++++++++++
  1673.  
  1674. From: siegel@world.std.com (Rich Siegel)
  1675. Date: 7 Mar 92 04:27:36 GMT
  1676. Organization: Symantec Language Products Group
  1677.  
  1678. In article <21205@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
  1679. >> The entire Symantec Languages Group should be commended for their work.  They
  1680. >> are a tiny group for what they are handling, and they are effectively
  1681. >> competing against Apple (MPW).
  1682. >
  1683. >I hope there's no real competition between MPW and Think, they both have
  1684. >their own market shares, and that's a good thing for both companies.
  1685.  
  1686. There's a piece of apocrypha that goes like this: A couple of years ago, a
  1687. manager at Apple in charge of either the MPW group or tools & languages
  1688. in general (I don't recall which, exactly) once reportedly said to the
  1689. MPW group: "THINK is not our competition. NeXT is our competition."
  1690.  
  1691. I couldn't agree more. Both companies produce tools that help make software.
  1692. Software sells CPUs. This is good, because CPU sales lead to software sales,
  1693. which in turn keeps us all gainfully employed. MPW and the THINK products
  1694. complement each other nicely, and any remotely serious developer should
  1695. have both.
  1696.  
  1697. R.
  1698.  
  1699.  
  1700. - -- 
  1701. - -----------------------------------------------------------------------
  1702. Rich Siegel                              Internet: siegel@world.std.com
  1703. Senior Software Engineer                 Applelink: SIEGEL
  1704. Symantec Languages Group
  1705.  
  1706. +++++++++++++++++++++++++++
  1707.  
  1708. From: cash@uri.csmil.umich.edu (Howard Cash)
  1709. Date: Sun, 08 Mar 92 11:33:22 EST
  1710. Organization: Cognitive Science Machine Intelligence Lab, Univ. of Michigan
  1711.  
  1712. In article <1992Feb28.185408.5166@unx.sas.com> sasdtm@stthomas.unx.sas.com
  1713. >     (Donald T. Major) writes:
  1714. >In article <1992Feb27.223708.20710@aio.jsc.nasa.gov>, 
  1715. >     brian@galileo.jsc.nasa.gov (Brian Donnell) writes:
  1716. >[stuff deleted]
  1717. >|> I would also like Think C to get way from this 'stop on the first error'
  1718. >|> nonsense.  Write it all out to a log file - so that I can leave a long
  1719. >|> compile unattended w/o being 99.999% sure that there will be no errors.
  1720. >No, no, no (:-))!  I actually LIKE the way the compiler works, as far
  1721. >as stopping on the errors...
  1722.  
  1723. Wow!  I've NEVER heard anyone say that they liked the fact that ThinkC
  1724. compiles stop on every error!  Since there is at least one person who
  1725. seems to like this "feature" (I presume it is because of a perception 
  1726. that this is where the compiler gets its speed) how about this:  If
  1727. you are compiling a big project and find an error in a file, at LEAST 
  1728. go on to the next file and compile it, if possible.  If I want to compile
  1729. 62 .c files in a project, I usually run it overnight.  If I failed to 
  1730. terminate a comment in file #6, I'd love to have the 61 OTHER files 
  1731. run through the compiler, even if the compiler doesn't check the naughty
  1732. file #6 for any other (subsequent) errors.
  1733.  
  1734. - -Hobie
  1735.  
  1736. +++++++++++++++++++++++++++
  1737.  
  1738. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  1739. Organization: Integrated Systems Laboratory, ETH, Zurich
  1740. Date: Mon, 9 Mar 1992 09:20:13 GMT
  1741.  
  1742. In article <21205@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
  1743. >Well, something like
  1744. >for(int i; i == 10; i++)
  1745. >
  1746. >is far more readable than having the i declared pages of text before the 
  1747. >for loop, or what...
  1748.  
  1749. Actually, this example is not extremely convincing, since it interacts with the
  1750. semantics of a C for loop in an unfortunate and counterintuitive way (Hint: try
  1751.  
  1752. for (int i = 0; i<10; i++)
  1753.    do_something;
  1754.  
  1755. for (int i = 0; i<15; i++)
  1756.    do_something_else;
  1757.  
  1758. and your compiler will say something unfriendly to you).
  1759.  
  1760. I like C++, but not because of this feature.
  1761.  
  1762. Matthias
  1763.  
  1764. - -----
  1765. Matthias Neeracher                                      neeri@iis.ethz.ch
  1766.  `We say "gestalt" when things combine to act in ways we can't explain'
  1767.                              -- Marvin Minsky, _The Society Of Mind_
  1768.  
  1769. +++++++++++++++++++++++++++
  1770.  
  1771. From: ksand@apple.com (Kent Sandvik)
  1772. Date: 9 Mar 92 01:31:40 GMT
  1773. Organization: MacDTS Mongols
  1774.  
  1775. In article <1992Mar02.210656.6658@ima.isc.com>, suitti@ima.isc.com (Stephen
  1776. Uitti) writes:
  1777. > I find it distressing how obnoxiously loud and arrogant many C++
  1778. > fanatics are.
  1779.  
  1780. Well, after using C++ since 1986 I'm still no C++ fanatic, however
  1781. we have to face the realities of software development, and until
  1782. we have better dynamic object oriented language implementations most
  1783. serious developers are starting to use C++ for their big projects.
  1784.  
  1785. >   1.  Implementation of a standard language, to the letter.
  1786. >       Think C 5 implements a really good ANSI C.
  1787. >       C++ is not a standard.  It's a moving target.
  1788.  
  1789. Not anymore, after the Cfront 2.0 shakeout. I would not worry about 
  1790. moving C++ code between environments, as long as they are written with
  1791. at least Cfront 2.0 features. And if someone complains about missing
  1792. templates or exception handling, there are always ways to get these features
  1793. working with a compiler that does not have 'em (i.e. Rational template 
  1794. pre-processor, MacApp exception handling libraries).
  1795.  
  1796. >   2.  Language stability.
  1797. >       C++ is changing all the time.  Count yourself lucky if
  1798. >       your code still compiles next year.
  1799.  
  1800. I don't think this valid at all. As mentioned earlier, I would not
  1801. worry about this at all.
  1802.  
  1803. >   3.  Portability.
  1804. >       The OOP stuff in Think C 5 is not really portable.
  1805. >       Neither is C++.
  1806.  
  1807. Sorry, not true, as most C++ compilers so far has been implemented
  1808. using Cfront from AT&T, it's been fairly trivial to move code between
  1809. platforms. Also the ARM book stabilized the feature list, so most if
  1810. not all C++ vendors try to conform to ARM until the ANSI standard is
  1811. ready.
  1812.  
  1813. >   4.  Speed.
  1814. >       The compiler has to be able to compile quickly.
  1815. >       Note that there are human factors to speed.  Under
  1816. >       thirty seconds, Under a minute, under ten minutes,
  1817. >       under an hour, and less than ten hours (overnight)
  1818. >       are targets.  MPW C++ misses anything under a minute.
  1819. >       I could cope with a super-optimizer that took all
  1820. >       night.
  1821.  
  1822. The language has nothing to do with implementations...
  1823.  
  1824. >   5.  Error checking
  1825. >       It should be able to perform strong type checking,
  1826. >       catch all language errors, provide "lint" capabilities,
  1827. >       and catch typical mistakes, such as "if (foo = bar) {..."
  1828. >       Think C does much, but not all it could.
  1829.  
  1830. Here's actually a case where C++ has far better error checking. However
  1831. it also slows down the parsing, so you always loose something when you
  1832. gain something.
  1833.  
  1834. >   9.  Debugging.
  1835. >       Symbolic source debugging, with asm hooks.  Breakpoints,
  1836. >       good formatting, especially for structures, etc.
  1837. >       When my app does something it shouldn't, the debugger
  1838. >       shouldn't crash, and should let me do post crash
  1839. >       analysis.  Think C has this.  I'm sure it could be
  1840. >       improved, especially with OOP.  I just don't know how.
  1841.  
  1842. This is also an implementation issue concerning debuggers. In the
  1843. Mac world, SADE, SourceBug and Jasik Debugger all understand the 
  1844. C++ object extensions. Also MacsBug and TMON are able to unmangle the mangled
  1845. C++ names.
  1846.  
  1847. > Do I need C++?  Well, currently, I find it is harder to debug
  1848. > than C.  The indirection is obfuscated.  It is too hard to track
  1849. > down.  The "call by reference" syntax makes it more difficult to
  1850. > tell if you are passing a pointer, a copy, or the original variable.
  1851.  
  1852.  
  1853. I find it easier to debug, mostly because data abstraction gives me
  1854. a nice way to narrow down problem states, something which is harder in a
  1855. structured program with no abstraction barriers.
  1856.  
  1857. Call-by-reference is Pascal VAR style, and many consider this to be more
  1858. easier to understand than C pointers (which is easy to grasp for an
  1859. assembly programmer, but harder for a pure high-level programmer never 
  1860. exposed to low level addressing schemes).
  1861.  
  1862. Cheers,
  1863. Kent
  1864.  
  1865. - --
  1866. Kent Sandvik - Apple DTS  - Dynamic Language Evangelist
  1867. ksand@apple.com
  1868. All opinions expressed are my own, and not related to any company or
  1869. organization. 
  1870. Happy, happy, joy, joy!
  1871.  
  1872. +++++++++++++++++++++++++++
  1873.  
  1874. From: suitti@ima.isc.com (Stephen Uitti)
  1875. Organization: Interactive Systems, Cambridge, MA 02138-5302
  1876. Date: Wed, 11 Mar 1992 19:32:06 GMT
  1877.  
  1878. In article <21275@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
  1879. >In article <1992Mar02.210656.6658@ima.isc.com>, suitti@ima.isc.com (Stephen
  1880. >Uitti) writes:
  1881. >>   1.  Implementation of a standard language, to the letter.
  1882. >>       Think C 5 implements a really good ANSI C.
  1883. >>       C++ is not a standard.  It's a moving target.
  1884. >
  1885. >Not anymore, after the Cfront 2.0 shakeout. I would not worry about 
  1886. >moving C++ code between environments, as long as they are written with
  1887. >at least Cfront 2.0 features. And if someone complains about missing
  1888. >templates or exception handling, there are always ways to get these features
  1889. >working with a compiler that does not have 'em (i.e. Rational template 
  1890. >pre-processor, MacApp exception handling libraries).
  1891.  
  1892. At some point, templates and exception handling will be
  1893. available.  Until then, one can use various non-portable tricks
  1894. as mentioned.  Not every environment has these tricks available.
  1895. When templates and exceptions become available, there will be
  1896. environments that won't get upgraded, for whatever reasons (the
  1897. compiler didn't use CFront, the company went out of business, etc.).
  1898.  
  1899. And not all compilers use Cfront.
  1900.  
  1901. >>   4.  Speed.
  1902. >The language has nothing to do with implementations...
  1903.  
  1904. In the real world it does.  Either you use Cfront and you have
  1905. parsing that is no worse than anyone else's, but slow, or you
  1906. do your own, integrated into your compiler, and it is faster.
  1907. I want a compiler that is faster.  That's why I like Think C.
  1908.  
  1909. >>   5.  Error checking
  1910. >>       It should be able to perform strong type checking,
  1911. >>       catch all language errors, provide "lint" capabilities,
  1912. >>       and catch typical mistakes, such as "if (foo = bar) {..."
  1913. >>       Think C does much, but not all it could.
  1914.  
  1915. >Here's actually a case where C++ has far better error checking. However
  1916. >it also slows down the parsing, so you always loose something when you
  1917. >gain something.
  1918.  
  1919. The trouble is that C++ adds all sorts of new complications to
  1920. the language.  For every error that might have been common in
  1921. C that C++ fixed, it introduces several new ones.
  1922.  
  1923. >> Do I need C++?  Well, currently, I find it is harder to debug
  1924. >> than C.  The indirection is obfuscated.  It is too hard to track
  1925. >> down.  The "call by reference" syntax makes it more difficult to
  1926. >> tell if you are passing a pointer, a copy, or the original variable.
  1927. >
  1928. >I find it easier to debug, mostly because data abstraction gives me
  1929. >a nice way to narrow down problem states, something which is harder in a
  1930. >structured program with no abstraction barriers.
  1931.  
  1932. What I meant by indirection is mostly the construction of
  1933. objects.  This is especially true if an object has a long
  1934. ancestry.  I spent an hour tracing through just the construction
  1935. of a single object the other day in an attempt to track down a
  1936. bug.  I eventually found the bug.  However, it took so long to
  1937. slog through it that I missed what I was looking for.  It wasn't
  1938. until the next day that I remembered the critical part that went
  1939. wrong and was able to look at the sources again to determine what
  1940. really happened.  Even that was painful, due to the fact that
  1941. each object has several constructors.  Which one was being
  1942. called?  By eye, there isn't always a match.  Is there some type
  1943. conversion going on behind my back?  It's bad enough that short
  1944. can be automatically promoted to a long.  Now a FurbleWart can be
  1945. automatically promoted to a BlinderSnatch.  Sometimes you have to
  1946. use the debugger just to find out which constructor is called.  I
  1947. don't want anything going on behind my back.  I want it all out
  1948. in the daylight.  That way I have a prayer of debugging things
  1949. by inspection.
  1950.  
  1951. >Call-by-reference is Pascal VAR style, and many consider this to be more
  1952. >easier to understand than C pointers (which is easy to grasp for an
  1953. >assembly programmer, but harder for a pure high-level programmer never 
  1954. >exposed to low level addressing schemes).
  1955.  
  1956. I'm not saying that VAR style parameters aren't easier to write,
  1957. I'm saying that they are harder to read.  The semantics aren't
  1958. clear.  Is this parameter modified?  Can it be?  If the answer is
  1959. "no" (as is clearer in plain C), then you can look elsewhere
  1960. quickly.  If the answer is "yes", you must trace through the
  1961. called routine for an answer.
  1962.  
  1963. Stephen.
  1964. suitti@ima.isc.com
  1965.  
  1966. +++++++++++++++++++++++++++
  1967.  
  1968. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  1969. Organization: Integrated Systems Laboratory, ETH, Zurich
  1970. Date: Thu, 12 Mar 1992 10:06:36 GMT
  1971.  
  1972. In article <1992Mar11.193206.25950@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
  1973. >In article <21275@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
  1974. >>In article <1992Mar02.210656.6658@ima.isc.com>, suitti@ima.isc.com (Stephen
  1975. >>Uitti) writes:
  1976. >>>   1.  Implementation of a standard language, to the letter.
  1977. >>>       Think C 5 implements a really good ANSI C.
  1978. >>>       C++ is not a standard.  It's a moving target.
  1979. >>
  1980. >>Not anymore, after the Cfront 2.0 shakeout. I would not worry about 
  1981. >>moving C++ code between environments, as long as they are written with
  1982. >>at least Cfront 2.0 features. And if someone complains about missing
  1983. >>templates or exception handling, there are always ways to get these features
  1984. >>working with a compiler that does not have 'em (i.e. Rational template 
  1985. >>pre-processor, MacApp exception handling libraries).
  1986. >
  1987. >At some point, templates and exception handling will be
  1988. >available.  Until then, one can use various non-portable tricks
  1989. >as mentioned.  Not every environment has these tricks available.
  1990. >When templates and exceptions become available, there will be
  1991. >environments that won't get upgraded, for whatever reasons (the
  1992. >compiler didn't use CFront, the company went out of business, etc.).
  1993.  
  1994. Nobody except Symantec supports the Think C extensions, either. If you don't
  1995. wnat to use template and exception "tricks" (and not all of them are
  1996. nonportable), you don't have to.
  1997.  
  1998. >And not all compilers use Cfront.
  1999. >
  2000. >>>   4.  Speed.
  2001. >>The language has nothing to do with implementations...
  2002. >
  2003. >In the real world it does.  Either you use Cfront and you have
  2004. >parsing that is no worse than anyone else's, but slow, or you
  2005. >do your own, integrated into your compiler, and it is faster.
  2006. >I want a compiler that is faster.  That's why I like Think C.
  2007.  
  2008. As you said above, not all compilers use CFront.
  2009.  
  2010. >>Here's actually a case where C++ has far better error checking. However
  2011. >>it also slows down the parsing, so you always loose something when you
  2012. >>gain something.
  2013. >
  2014. >The trouble is that C++ adds all sorts of new complications to
  2015. >the language.  For every error that might have been common in
  2016. >C that C++ fixed, it introduces several new ones.
  2017.  
  2018. Such as ?
  2019.  
  2020. >  It wasn't
  2021. >until the next day that I remembered the critical part that went
  2022. >wrong and was able to look at the sources again to determine what
  2023. >really happened.  Even that was painful, due to the fact that
  2024. >each object has several constructors.  Which one was being
  2025. >called?  By eye, there isn't always a match.  Is there some type
  2026. >conversion going on behind my back?  It's bad enough that short
  2027. >can be automatically promoted to a long.  Now a FurbleWart can be
  2028. >automatically promoted to a BlinderSnatch.  Sometimes you have to
  2029. >use the debugger just to find out which constructor is called.  I
  2030. >don't want anything going on behind my back.
  2031.  
  2032. Nobody forces you to use these constructs, and some of us find them very
  2033. convenient.
  2034.  
  2035. >I'm not saying that VAR style parameters aren't easier to write,
  2036. >I'm saying that they are harder to read.  The semantics aren't
  2037. >clear.  Is this parameter modified?  Can it be?  If the answer is
  2038. >"no" (as is clearer in plain C), then you can look elsewhere
  2039. >quickly.  If the answer is "yes", you must trace through the
  2040. >called routine for an answer.
  2041.  
  2042. A question of discipline. In C++ you can distinguish cases very nicely:
  2043.  
  2044. a(Foo x)      //    Won't modfify it
  2045. a(Foo & x)      //    Will modify
  2046. a(const Foo & x)  //    Won't modify, just passed as areference for speed
  2047.  
  2048. You can't distinguish cases 2 and 3 in Pascal, and you couldn't in K&R C.
  2049.  
  2050. Matthias
  2051.  
  2052. - -----
  2053. Matthias Neeracher                                   neeri@iis.ethz.ch
  2054.    "There once was an Age of Reason, but we've progressed beyond it."
  2055.                                    -- Ayn Rand, _Atlas Shrugged_
  2056.  
  2057. +++++++++++++++++++++++++++
  2058.  
  2059. From: suitti@ima.isc.com (Stephen Uitti)
  2060. Date: 12 Mar 92 18:20:44 GMT
  2061. Organization: Interactive Systems, Cambridge, MA 02138-5302
  2062.  
  2063. In article <NEERI.92Mar12110636@iis.ethz.ch> neeri@iis.ethz.ch (Matthias Ulrich Neeracher) writes:
  2064. >In article <1992Mar11.193206.25950@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
  2065. >>In article <21275@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
  2066. >>>In article <1992Mar02.210656.6658@ima.isc.com>, suitti@ima.isc.com (Stephen
  2067. >>>Uitti) writes:
  2068. >>>Here's actually a case where C++ has far better error checking. However
  2069. >>>it also slows down the parsing, so you always loose something when you
  2070. >>>gain something.
  2071. >>
  2072. >>The trouble is that C++ adds all sorts of new complications to
  2073. >>the language.  For every error that might have been common in
  2074. >>C that C++ fixed, it introduces several new ones.
  2075. >
  2076. >Such as ?
  2077.  
  2078. Such as reference parameters.
  2079.  
  2080. >>I'm not saying that VAR style parameters aren't easier to write,
  2081. >>I'm saying that they are harder to read.  The semantics aren't
  2082. >>clear.  Is this parameter modified?  Can it be?  If the answer is
  2083. >>"no" (as is clearer in plain C), then you can look elsewhere
  2084. >>quickly.  If the answer is "yes", you must trace through the
  2085. >>called routine for an answer.
  2086. >
  2087. >A question of discipline.
  2088.  
  2089. Not if I'm not writing the code.  I have no control over the
  2090. code other people on the project write or wrote.
  2091.  
  2092. >In C++ you can distinguish cases very nicely:
  2093. >a(Foo x)      //    Won't modfify it
  2094. >a(Foo & x)      //    Will modify
  2095. >a(const Foo & x)  //    Won't modify, just passed as areference for speed
  2096. >
  2097. >You can't distinguish cases 2 and 3 in Pascal, and you couldn't in K&R C.
  2098.  
  2099. Those are prototypes for the function, not calls.  This is
  2100. a call:
  2101.  
  2102.     Foo x;    // a variable.
  2103.     a(x);    // a call.  What does it do?
  2104.         // it might be call-by reference
  2105.         // it might be call by copy
  2106.     a(&x);    // it's call by reference.
  2107.  
  2108. In C, you'd say
  2109.  
  2110.     struct Foo x;
  2111.  
  2112.     a(&x);    /* pass a pointer to the struct */
  2113.     a(x);    /* pass a copy of the struct */
  2114.         /* there is no call by reference, so
  2115.          * the above calls are unambiguous.
  2116.          * I don't have to look up the prototype.
  2117.          * In straight C, there will only be one.
  2118.          */
  2119.  
  2120. Stephen.
  2121. suitti@ima.isc.com
  2122.  
  2123. +++++++++++++++++++++++++++
  2124.  
  2125. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  2126. Date: 13 Mar 92 09:33:04 GMT
  2127. Organization: Integrated Systems Laboratory, ETH, Zurich
  2128.  
  2129. In article <1992Mar12.182044.21654@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
  2130. >In article <NEERI.92Mar12110636@iis.ethz.ch> neeri@iis.ethz.ch (Matthias Ulrich Neeracher) writes:
  2131. >>In article <1992Mar11.193206.25950@ima.isc.com> suitti@ima.isc.com (Stephen Uitti) writes:
  2132. >>>The trouble is that C++ adds all sorts of new complications to
  2133. >>>the language.  For every error that might have been common in
  2134. >>>C that C++ fixed, it introduces several new ones.
  2135. >>
  2136. >>Such as ?
  2137. >
  2138. >Such as reference parameters.
  2139.  
  2140. Reference parameters are *not8 an error. See below.
  2141.  
  2142. >>>I'm not saying that VAR style parameters aren't easier to write,
  2143. >>>I'm saying that they are harder to read.  The semantics aren't
  2144. >>>clear.  Is this parameter modified?  Can it be?  If the answer is
  2145. >>>"no" (as is clearer in plain C), then you can look elsewhere
  2146. >>>quickly.  If the answer is "yes", you must trace through the
  2147. >>>called routine for an answer.
  2148. >>
  2149. >>A question of discipline.
  2150. >
  2151. >Not if I'm not writing the code.  I have no control over the
  2152. >code other people on the project write or wrote.
  2153.  
  2154. No programming language can prevent people from writing bad code. It can merely
  2155. encourage them to write good code.
  2156.  
  2157. >>In C++ you can distinguish cases very nicely:
  2158. >>a(Foo x)      //    Won't modfify it
  2159. >>a(Foo & x)      //    Will modify
  2160. >>a(const Foo & x)  //    Won't modify, just passed as areference for speed
  2161. >>
  2162. >>You can't distinguish cases 2 and 3 in Pascal, and you couldn't in K&R C.
  2163. >
  2164. >Those are prototypes for the function, not calls.  This is
  2165. >a call:
  2166. >
  2167. >    Foo x;    // a variable.
  2168. >    a(x);    // a call.  What does it do?
  2169. >        // it might be call-by reference
  2170. >        // it might be call by copy
  2171. >    a(&x);    // it's call by reference.
  2172. >
  2173. >In C, you'd say
  2174. >
  2175. >    struct Foo x;
  2176. >
  2177. >    a(&x);    /* pass a pointer to the struct */
  2178. >    a(x);    /* pass a copy of the struct */
  2179. >        /* there is no call by reference, so
  2180. >         * the above calls are unambiguous.
  2181. >         * I don't have to look up the prototype.
  2182. >         * In straight C, there will only be one.
  2183. >         */
  2184.  
  2185. But this is not strictly true:
  2186.  
  2187. - - a() might be a preprocessor macro
  2188. - - x could be an array
  2189. - - x could be a pointer or contain a pointer to a structure which is modified.
  2190.   Last time I checked, C had no deep copy semantics.
  2191. - - &x could be merely a variable passed by reference for *speed*, not to modify
  2192.   it. There are indeed a few C++ proponents who argue that call by reference
  2193.   should only be used for such cases.
  2194.  
  2195. Matthias
  2196.  
  2197. - -----
  2198. Matthias Neeracher                                   neeri@iis.ethz.ch
  2199.    "No, what he didn't like about heroes was that they were usually
  2200.     suicidally gloomy when sober and homicidally insane when drunk."
  2201.                           -- Terry Pratchett, _The Colour of Magic_
  2202.  
  2203. +++++++++++++++++++++++++++
  2204.  
  2205. From: roy@adeptsln.cts.com (Roy Lovejoy)
  2206. Date: 10 Mar 92 20:20:17 GMT
  2207. Organization: Adept Solutions
  2208.  
  2209. In article <BKq721.Fv3@world.std.com> siegel@world.std.com (Rich Siegel)  
  2210. writes:
  2211. > There's a piece of apocrypha that goes like this: A couple of years ago, a
  2212. > manager at Apple in charge of either the MPW group or tools & languages
  2213. > in general (I don't recall which, exactly) once reportedly said to the
  2214. > MPW group: "THINK is not our competition. NeXT is our competition."
  2215. > <<OTHER STUFF>>
  2216. > -----------------------------------------------------------------------
  2217. > Rich Siegel                              Internet: siegel@world.std.com
  2218. > Senior Software Engineer                 Applelink: SIEGEL
  2219. > Symantec Languages Group
  2220.  
  2221. - --
  2222.  
  2223. But with NeXTstep running on a '486, it WILL be running on a Mac soon...
  2224. Hmmmm. perhaps we might be able to run any OS on any machine, thus better  
  2225. productivity on one platform may lead to increased sales on another..
  2226. Something to think about.
  2227.  
  2228. - -----------------+--------------------------------------------------
  2229. Roy Lovejoy      | internet:  roy@adeptsln.cts.com
  2230. Head RGB Guy     | AppleLink: adept
  2231. Adept Solutions  | CIS:       72447,1447
  2232.                  | dual certified developer: NeXT & Apple ;)
  2233. - -----------------+--------------------------------------------------
  2234.  
  2235. +++++++++++++++++++++++++++
  2236.  
  2237. From: brian@galileo.jsc.nasa.gov (Brian Donnell)
  2238. Date: 13 Mar 92 20:26:28 GMT
  2239. Organization: NASA/JSC
  2240.  
  2241. Could we please take all the C++ stuff that has been in this thread and move
  2242. it over to comp.lang.c++?
  2243.  
  2244. Thanks.
  2245. Brian Donnell
  2246. NASA/JSC
  2247.  
  2248. +++++++++++++++++++++++++++
  2249.  
  2250. From: ksand@apple.com (Kent Sandvik)
  2251. Date: 17 Mar 92 21:24:40 GMT
  2252. Organization: MacDTS Mongols
  2253.  
  2254. In article <NEERI.92Mar9102013@iis.ethz.ch>, neeri@iis.ethz.ch (Matthias Ulrich
  2255. Neeracher) writes:
  2256. > In article <21205@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
  2257. > >Well, something like
  2258. > >for(int i; i == 10; i++)
  2259. > >
  2260. > >is far more readable than having the i declared pages of text before the 
  2261. > >for loop, or what...
  2262. > Actually, this example is not extremely convincing, since it interacts with
  2263. the
  2264. > semantics of a C for loop in an unfortunate and counterintuitive way (Hint:
  2265. try
  2266. > for (int i = 0; i<10; i++)
  2267. >    do_something;
  2268. > for (int i = 0; i<15; i++)
  2269. >    do_something_else;
  2270. > and your compiler will say something unfriendly to you).
  2271. > I like C++, but not because of this feature.
  2272.  
  2273. I guess we're into the issue of variable scope, and yes in that sense
  2274. the i will be valid till the end of the block (I assume we are talking
  2275. about nested for statements).
  2276.  
  2277. However there are many times I write code where I declare a temp variable
  2278. or instance of a class, and I'm sure it will not be used after the construct
  2279. itself, and this is the case where declaration 'on-the-flight' is both
  2280. useful and easier to read code-wise. So I don't think this is one of the 
  2281. C++ issues that stink :-). The things that are brain-damaged has to do
  2282. with the non-orthogonality of the language itself. For instance name
  2283. clashing due to lack of module/package support will cause a lot of screaming
  2284. during big projects.
  2285.  
  2286. Cheers,
  2287. Kent
  2288. - --
  2289. Kent Sandvik/DTS - Dynamic Language Evangelist.
  2290. Opinions expressed are not private, and not owned by any company, 
  2291. organization or group. Happy happy, joy joy!
  2292.  
  2293. +++++++++++++++++++++++++++
  2294.  
  2295. From: ts@cup.portal.com (Tim W Smith)
  2296. Date: 20 Mar 92 14:05:09 GMT
  2297. Organization: The Portal System (TM)
  2298.  
  2299. > Indeed; some people don't *want* C++.  I'm fully aware that that's a
  2300. > heretical statement in some circles, but *expert* opinion is more divided
  2301. > on C++ than many people realize.  Certainly it can be a powerful tool
  2302. > for establishing maintainability or for designing a program structure,
  2303. > but it's not really any "easier" to use OOP; it's a subtle skill that
  2304. > some programmers are simply not comfortable with.  It's not their style.
  2305. > And [he says, climbing out on a limb] it's not necessarily the "wave of
  2306. > the future" that so many people (both well- and ill-informed) seem to
  2307. > think.
  2308.  
  2309. Indeed, some of us use C as a system programming language.  C++ is much
  2310. harder to use for this, since the runtime support for the language is
  2311. more complicated.  Dynamic allocation of objects is fine, but my device
  2312. driver interrupt routine might be running at a time when it is not allowed!
  2313. C is easier to use in glorified-assembler mode, which is what we device
  2314. driver writers want.
  2315.  
  2316. I hope that if Symantec does offer a C++ someday, they also keep C available,
  2317. either by keeping the products separate, or by offering C++ as a preprocessor
  2318. for Think C.
  2319.  
  2320.                             Tim Smith
  2321.  
  2322. +++++++++++++++++++++++++++
  2323.  
  2324. From: ts@cup.portal.com (Tim W Smith)
  2325. Date: 20 Mar 92 14:09:24 GMT
  2326. Organization: The Portal System (TM)
  2327.  
  2328. >    Then you haven't really tried to use C++.  No language makes
  2329. >    programmers write "munged" programs--programmers write "munged"
  2330. >    programs.  You can write truly awful, impossible-to-read, and
  2331.  
  2332. OK, lets see you write a non-munged program of reasonable size in TECO.
  2333.  
  2334.                             Tim Smith
  2335.  
  2336. +++++++++++++++++++++++++++
  2337.  
  2338. From: ts@cup.portal.com (Tim W Smith)
  2339. Date: 20 Mar 92 14:32:27 GMT
  2340. Organization: The Portal System (TM)
  2341.  
  2342. > Dave, I think most of us work that way. But there are still occasions when
  2343. > you can end up with an enormous number of files to recompile. For example,
  2344. > say you change two files: you add a field to a structure in some header file
  2345. > and you add some code to use that structure in some c file. But, you introduce
  2346. > a syntax error into the c file. You hit Update and walk away. THINK C suddenly
  2347. > has 100 files to recompile because of the changed header. Unfortunately,
  2348. > everything stops when it gets to the c file with the syntax error.
  2349.  
  2350. Perhaps Think C should keep track of why it needs to recompile a source file.
  2351. Recompilation could then be ordered to be likely to hit errors quickly:
  2352.  
  2353.     0. Compile any new source files.
  2354.  
  2355.     1. Compile files whose source has changed and that also include
  2356.     one or more changed header files.
  2357.  
  2358.     2. Find the smallest set of C files (smallest means least
  2359.     size) that include all the changed header files not included in
  2360.     files from steps 0 or 1.  Compile these.
  2361.  
  2362.     3. Compile any changed C files not already dealt with above.
  2363.  
  2364.     4. Compile anything else that needs to be recompiled.
  2365.  
  2366.                             Tim Smith
  2367.  
  2368. +++++++++++++++++++++++++++
  2369.  
  2370. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  2371. Organization: Integrated Systems Laboratory, ETH, Zurich
  2372. Date: Mon, 23 Mar 1992 14:12:22 GMT
  2373.  
  2374. In article <56113@cup.portal.com> ts@cup.portal.com (Tim W Smith) writes:
  2375. >Indeed, some of us use C as a system programming language.  C++ is much
  2376. >harder to use for this, since the runtime support for the language is
  2377. >more complicated.  Dynamic allocation of objects is fine, but my device
  2378. >driver interrupt routine might be running at a time when it is not allowed!
  2379. >C is easier to use in glorified-assembler mode, which is what we device
  2380. >driver writers want.
  2381. >
  2382. >I hope that if Symantec does offer a C++ someday, they also keep C available,
  2383. >either by keeping the products separate, or by offering C++ as a preprocessor
  2384. >for Think C.
  2385.  
  2386. I don't really understand what your problem is. The changes required to make a
  2387. reasonably written ANSI C program compile under C++ are, to my knowledge,
  2388. minimal (Bracketing prototypes with extern "C", any other problems ?).
  2389.  
  2390. Matthias
  2391.  
  2392. - -----
  2393. Matthias Neeracher                                   neeri@iis.ethz.ch
  2394.    "Have you heard of the new Cambridge compilers ? They distribute
  2395.     gear-wear much more evenly"
  2396.         -- William Gibson/Bruce Sterling, _The Difference Engine_
  2397.  
  2398.  
  2399. +++++++++++++++++++++++++++
  2400.  
  2401. From: ksand@apple.com (Kent Sandvik)
  2402. Date: 23 Mar 92 18:24:56 GMT
  2403. Organization: MacDTS Mongols
  2404.  
  2405.  
  2406. It is hilarious that I (a dynamic language evangelist) am
  2407. supporting C++, anyway...
  2408.  
  2409. In article <1992Mar11.193206.25950@ima.isc.com>, suitti@ima.isc.com (Stephen
  2410. Uitti) writes:
  2411. > In article <21275@goofy.Apple.COM> ksand@apple.com (Kent Sandvik) writes:
  2412. > >>   4.  Speed.
  2413. > >The language has nothing to do with implementations...
  2414. > In the real world it does.  Either you use Cfront and you have
  2415. > parsing that is no worse than anyone else's, but slow, or you
  2416. > do your own, integrated into your compiler, and it is faster.
  2417. > I want a compiler that is faster.  That's why I like Think C.
  2418.  
  2419. No, we have a language spec, and a design, they are usually separate.
  2420. Borland managed to make a fast C++ compiler, AT&T didn't.
  2421.  
  2422. > >Here's actually a case where C++ has far better error checking. However
  2423. > >it also slows down the parsing, so you always loose something when you
  2424. > >gain something.
  2425. > The trouble is that C++ adds all sorts of new complications to
  2426. > the language.  For every error that might have been common in
  2427. > C that C++ fixed, it introduces several new ones.
  2428.  
  2429. It is true that C++ tried to eliminate many of the old C problems.
  2430. And yes, by adding new features you will get new errors. But I still
  2431. don't see the logic - by including new features you will certainly 
  2432. get new problems. However in the C++ case at least the design took
  2433. into consideration semantical issues with each new feature
  2434. (at least they tried...).
  2435.  
  2436. > What I meant by indirection is mostly the construction of
  2437. > objects.  This is especially true if an object has a long
  2438. > ancestry.  I spent an hour tracing through just the construction
  2439. > of a single object the other day in an attempt to track down a
  2440. > bug.  I eventually found the bug.  However, it took so long to
  2441. > slog through it that I missed what I was looking for.  It wasn't
  2442. > until the next day that I remembered the critical part that went
  2443. > wrong and was able to look at the sources again to determine what
  2444. > really happened.  Even that was painful, due to the fact that
  2445. > each object has several constructors.  Which one was being
  2446. > called?  By eye, there isn't always a match.  Is there some type
  2447. > conversion going on behind my back?  It's bad enough that short
  2448. > can be automatically promoted to a long.  Now a FurbleWart can be
  2449. > automatically promoted to a BlinderSnatch.  Sometimes you have to
  2450. > use the debugger just to find out which constructor is called.  I
  2451. > don't want anything going on behind my back.  I want it all out
  2452. > in the daylight.  That way I have a prayer of debugging things
  2453. > by inspection.
  2454.  
  2455. I don't see the difference between constructors generated by 
  2456. a compiler, and linking libraries which call other functions behind
  2457. the programmer's back. It's really a small difference. However in the 
  2458. case of data abstraction you could eliminate factors down to one main
  2459. thread, in the case of functional programming you have to take into
  2460. account usually the whole function calling flow, and that could sometimes
  2461. be really tricky.
  2462.  
  2463. > >Call-by-reference is Pascal VAR style, and many consider this to be more
  2464. > >easier to understand than C pointers (which is easy to grasp for an
  2465. > >assembly programmer, but harder for a pure high-level programmer never 
  2466. > >exposed to low level addressing schemes).
  2467. > I'm not saying that VAR style parameters aren't easier to write,
  2468. > I'm saying that they are harder to read.  The semantics aren't
  2469. > clear.  Is this parameter modified?  Can it be?  If the answer is
  2470. > "no" (as is clearer in plain C), then you can look elsewhere
  2471. > quickly.  If the answer is "yes", you must trace through the
  2472. > called routine for an answer.
  2473.  
  2474. They are as hard to read as pointer syntax.
  2475.  
  2476. Cheers,
  2477. Kent
  2478.  
  2479. - --
  2480. Kent Sandvik/DTS - Dynamic Language Evangelist.
  2481. Opinions expressed are private, and not owned by any company, 
  2482. organization or group. Happy happy, joy joy!
  2483.  
  2484. +++++++++++++++++++++++++++
  2485.  
  2486. From: ksand@apple.com (Kent Sandvik)
  2487. Date: 25 Mar 92 20:04:34 GMT
  2488. Organization: MacDTS Mongols
  2489.  
  2490. In article <NEERI.92Mar23151222@iis.ethz.ch>, neeri@iis.ethz.ch (Matthias Ulrich
  2491. Neeracher) writes:
  2492. > I don't really understand what your problem is. The changes required to make a
  2493. > reasonably written ANSI C program compile under C++ are, to my knowledge,
  2494. > minimal (Bracketing prototypes with extern "C", any other problems ?).
  2495.  
  2496. ARM, page 403, lists the differences between C++ and ANSI C.
  2497.  
  2498. Kent
  2499.  
  2500. - --
  2501. Kent Sandvik/DTS - Dynamic Language Evangelist.
  2502. Opinions expressed are not private, and not owned by any company, 
  2503. organization or group. Happy happy, joy joy!
  2504.  
  2505. ---------------------------
  2506.  
  2507. End of C.S.M.P. Digest
  2508. **********************
  2509.